Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Get all routes, Laravel 4

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 264
    Comment on it

    This is one of the important point which is not available on even stackoverflow. I want that by using one controller we at the moment which will handle every request that comes to my laravel 4.x application.This is one of the question which we should know.

    The example to solve this issue is:

    Example:

    Regular expressions are set as requirements and not directly in the route.

    Route::any('{all}', function($uri)
    {
        return View::make('hello');
    })->where('all', '.*');
    

    By using the above code we can handle every request that comes to my laravel 4.x

 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: