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

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners