Routing
Sprnva has a beautiful routing built in. Route is our traffic control of our application that tells the entire application which page to be loaded when we hit a certain url.
Route::get('/uri', ['Controller@method', ['middleware']]);Route::get($uri, $action);
Route::post($uri, $action);
Route::put($uri, $action);
Route::patch($uri, $action);
Route::delete($uri, $action);
Route::options($uri, $action);// routes is accessible without authenticating
Route::get("/register", ['RegisterController@index']);
Route::post("/register", ['RegisterController@store']);
// routes is accessible only if authenticated
Route::get("/profile", ['ProfileController@index', ['auth']]);
Route::post('/profile', ['ProfileController@update', ['auth']]);Last updated