Category: Laravel, api

Routing allows the user to route application requests to its appropriate controller. Hence, it is important for newcomers to know and extend their knowledge about routing.

Here are a few tricks that can help you to use routing in Laravel: Users can define namespace for a group of routes using fluent routing API. Run the command given below to create controller in App\Http\Controllers\Admin: After running the command, routes/web.php will look like this: To find or debug all defined routes, users can run php artisan route:list . Basically what this command does is that it helps to see name of all routes and attached middleware to the route.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners