Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Laravel 5.0 Grouping Similar Routing Requets Requests

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 277
    Comment on it

    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)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: