In Laravel many times we need to group together many routing requests having same middleware, controller, suffix, etc. We can achieve that by using Route::group. The syntax of it is stated below.
Syntax :-
Route::group(["middleware" => ["auth", "employee"]], function() {
Route::get("inspirations/{id?}/{randomize?}/{slug?}", "InspirationsController@index");
Route::post("inspirations/get-inspiration", "InspirationsController@get_inspiration");
................
});
0 Comment(s)