classes/Routing/Router.php
public function registerWildcard()
    {
        // Setup a wildcarded catch all route
        Route::any('{path}', ['as' => 'decoy::wildcard', function ($path) {

            // Remember the detected route
            App::make('events')->listen('wildcard.detection', function ($controller, $action) {
                $this->action($controller.'@'.$action);
            });

            // Do the detection
            $router = App::make('decoy.wildcard');
            $response = $router->detectAndExecute();
            if (is_a($response, 'Symfony\Component\HttpFoundation\Response')
                || is_a($response, 'Illuminate\View\View')) { // Possible when layout is involved
                return $response;
            } else {
                App::abort(404);
            }
        }])->where('path', '.*');
    }
public function registerWildcard()
    {
        // Setup a wildcarded catch all route
        Route::any('{path}', ['as' => 'decoy::wildcard', function ($path) {

            // Remember the detected route
            App::make('events')->listen('wildcard.detection', function ($controller, $action) {
                $this->action($controller.'@'.$action);
            });

            // Do the detection
            $router = App::make('decoy.wildcard');
            $response = $router->detectAndExecute();
            if (is_a($response, 'Symfony\Component\HttpFoundation\Response')
                || is_a($response, 'Illuminate\View\View')) { // Possible when layout is involved
                return $response;
            } else {
                App::abort(404);
            }
        }])->where('path', '.*');
    }
public function registerWildcard ( ) { // Setup a wildcarded catch all route Route :: any ( '{path}' , [ 'as' => 'decoy::wildcard' , function ( $ path ) { // Remember the detected route App :: make ( 'events' ) -> listen ( 'wildcard.detection' , function ( $ controller , $ action ) { $ this -> action ( $ controller . '@' . $ action ) ; } ) ; // Do the detection $ router = App :: make ( 'decoy.wildcard' ) ; $ response = $ router -> detectAndExecute ( ) ; if ( is_a ( $ response , 'Symfony\Component\HttpFoundation\Response' ) || is_a ( $ response , 'Illuminate\View\View' ) ) { // Possible when layout is involved return $ response ; } else { App :: abort ( 404 ) ; } } ] ) -> where ( 'path' , '.*' ) ; }
Setup wilcard routing

@return void
Setup wilcard routing