src/Engine/Traits/WithPermissionTrait.php
private function _checkPermission($name, $attribute)
    {
        if ($name == 'store') {
            return $this->permissionStore($attribute);
        }

        if ($name == 'update') {
            return $this->permissionUpdate($attribute);
        }

        if ($name == 'delete') {
            return $this->permissionDelete($attribute);
        }

        if ($name == 'order') {
            return $this->permissionOrder($attribute);
        }

        if ($name == 'export') {
            return $this->permissionExport($attribute);
        }

        return $this->permissionView($attribute);
    }
private function _checkPermission($name, $attribute)
    {
        if ($name == 'store') {
            return $this->permissionStore($attribute);
        }

        if ($name == 'update') {
            return $this->permissionUpdate($attribute);
        }

        if ($name == 'delete') {
            return $this->permissionDelete($attribute);
        }

        if ($name == 'order') {
            return $this->permissionOrder($attribute);
        }

        if ($name == 'export') {
            return $this->permissionExport($attribute);
        }

        return $this->permissionView($attribute);
    }
private function _checkPermission ( $ name , $ attribute ) { if ( $ name == 'store' ) { return $ this -> permissionStore ( $ attribute ) ; } if ( $ name == 'update' ) { return $ this -> permissionUpdate ( $ attribute ) ; } if ( $ name == 'delete' ) { return $ this -> permissionDelete ( $ attribute ) ; } if ( $ name == 'order' ) { return $ this -> permissionOrder ( $ attribute ) ; } if ( $ name == 'export' ) { return $ this -> permissionExport ( $ attribute ) ; } return $ this -> permissionView ( $ attribute ) ; }
Check permission by name
@param  string $name
@param  mixed $attribute
@return boolean
Check permission by name