Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Routing in Laravel 5.x

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 40
    Comment on it

    In any project routing plays an important role.In Laravel 4.x we will define our routes in routes.php which is in app/Http/routes.php which is loaded by the App\Providers\RouteServiceProvider class. In Laravel 5.x the basic routes consist of a URL and a closure callback.

    Example: Basic Get Route

    Route::get('/', function () {
        return 'Hello World';
    });
    

    Example: Basic Post Route

    Route::post('/', function () {
        return 'Hello World';
    });
    

    Example: Basic Put Route

    Route::put('/', function () {
        return 'Hello World';
    });
    

 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: