classes/Middleware/Auth.php
protected function dectectFromWildcardRouter()
    {
        $wildcard = App::make('decoy.wildcard');

        // Attach / detach are ACL-ed by the parent controller.  It's the one being
        // touched,
        $action = $wildcard->detectAction();
        if (in_array($action, ['attach', 'remove'])) {
            $controller = request('parent_controller');
            $action = 'update';

        // Otherwise, use the controller from the route
        } else {
            $controller = $wildcard->detectControllerName();
        }

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

        // Return the detected action and controller
        return [$action, $controller];
    }
protected function dectectFromWildcardRouter()
    {
        $wildcard = App::make('decoy.wildcard');

        // Attach / detach are ACL-ed by the parent controller.  It's the one being
        // touched,
        $action = $wildcard->detectAction();
        if (in_array($action, ['attach', 'remove'])) {
            $controller = request('parent_controller');
            $action = 'update';

        // Otherwise, use the controller from the route
        } else {
            $controller = $wildcard->detectControllerName();
        }

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

        // Return the detected action and controller
        return [$action, $controller];
    }
protected function dectectFromWildcardRouter ( ) { $ wildcard = App :: make ( 'decoy.wildcard' ) ; // Attach / detach are ACL-ed by the parent controller.  It's the one being // touched, $ action = $ wildcard -> detectAction ( ) ; if ( in_array ( $ action , [ 'attach' , 'remove' ] ) ) { $ controller = request ( 'parent_controller' ) ; $ action = 'update' ; // Otherwise, use the controller from the route } else { $ controller = $ wildcard -> detectControllerName ( ) ; } // Further mapping of the action $ action = $ this -> mapActionToPermission ( $ action ) ; // Return the detected action and controller return [ $ action , $ controller ] ; }
Get the action and controller from the wildcard router

@return array action,controller
Get the action and controller from the wildcard router