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

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 255
    Comment on it

    I have a situation where I want that every request that comes to my laravel 4 application for this I will use one controller at the moment which should handle every request. For handling this query the solution is as follow:

    This is the question and answer of this question is as follow:


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

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

    By this we will get all routes using 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: