You know that part of every web based application where you tell it what to do when a request comes in on a certain URL? This is Express.js (a Node.js package) app.get('/', function (req, res) { res.send('root') }); app.get('/about', function (req, res) { res.send('about') }); app.get('/users/:userId/books/:bookId', function (req, res) { res.send(req.params) }); // Route path: /users/:userId/books/:bookId // Request URL: http://localhost:3000/users/34/books/8989 // req.params: { "userId": "34", "bookId": "8989" } This is Laravel: $router->group(['middleware' => 'web'], function ($router) { // API Token Refresh... $router->put( '/spark/token', 'TokenSecretController@refresh' ); // API Settings $router->get( '/settings/api/tokens', 'TokenSecretController@all' ); $router->post( '/settings/api/token', 'TokenSecretController@store' ); $router->put( '/settings/api/token/{token_id}', 'TokenSecretController@update' ); $router->get( '/settings/api/token/abilities', 'TokenSecretAbilitiesController@all' ); $router->delete( '/settings/api/token/{token_id}', 'TokenSecretController@destroy' ); // $router->get(
Share This

We are using cookies on our website

Please confirm, if you accept our tracking cookies. You can also decline the tracking, so you can continue to visit our website without any data sent to third party services.