classes/Middleware/Auth.php
protected function dectectFromExplicitRoute()
    {
        // Get the action
        $action = Route::current()->getActionName();
        if ($action == 'Closure') {
            throw new \Exception('decoy.auth requires routing to controllers.');
        }

        // Get parse the `uses` from the route definition
        preg_match('#(.+)@(.+)#', Route::current()->getActionName(), $matches);
        $controller = $matches[1];
        $action = $matches[2];

        // Further mapping of the action
        $action = $this->mapActionToPermission($action);

        // Return the detected action and controller
        return [$action, $controller];
    }
protected function dectectFromExplicitRoute()
    {
        // Get the action
        $action = Route::current()->getActionName();
        if ($action == 'Closure') {
            throw new \Exception('decoy.auth requires routing to controllers.');
        }

        // Get parse the `uses` from the route definition
        preg_match('#(.+)@(.+)#', Route::current()->getActionName(), $matches);
        $controller = $matches[1];
        $action = $matches[2];

        // Further mapping of the action
        $action = $this->mapActionToPermission($action);

        // Return the detected action and controller
        return [$action, $controller];
    }
protected function dectectFromExplicitRoute ( ) { // Get the action $ action = Route :: current ( ) -> getActionName ( ) ; if ( $ action == 'Closure' ) { throw new \ Exception ( 'decoy.auth requires routing to controllers.' ) ; } // Get parse the `uses` from the route definition preg_match ( '#(.+)@(.+)#' , Route :: current ( ) -> getActionName ( ) , $ matches ) ; $ controller = $ matches [ 1 ] ; $ action = $ matches [ 2 ] ; // Further mapping of the action $ action = $ this -> mapActionToPermission ( $ action ) ; // Return the detected action and controller return [ $ action , $ controller ] ; }
Get the action and controller from an explicilty defined route

@return array action,controller

@throws Exception
Get the action and controller from an explicilty defined route