Update Router.php and index.js