laravel routing summary

Aug 23, 2020 PHP Beginner Laravel

#What is routing Role that connects the URL requested from view and the Action defined in Controller The mechanism that calls the action of the corresponding Controller according to the accessed address is called Routing

#Basic way of writing Routing


A URL starting with will be specified. Meaning that when you access the URL user/news/create, it will be assigned to the create action of NewsController

#Routing into a group

If you use Route::group in the routing settings, you can collectively define Mainly used ・Prefix (used when putting together URLs) ・Middleware (used mainly for authentication) It’s

The code below is Routing using the same URL via the prefix is grouped together so that it is easy for anyone to see and can handle changes easily.

Route::group(['prefix' =>'user'], function() {