protected function determineRouteAction(Model $model)
    {
        $routeHelper = $this->getRouteHelper();

        $permissionPrefix = $routeHelper->getPermissionPrefixForModelSlug(
            $routeHelper->getRouteSlugForModelClass(get_class($model))
        );

        // Change the action to show if we don't have edit permissions
        if ( ! cms_auth()->can($permissionPrefix . 'edit')) {
            return 'show';
        }

        return 'edit';
    }
protected function determineRouteAction(Model $model)
    {
        $routeHelper = $this->getRouteHelper();

        $permissionPrefix = $routeHelper->getPermissionPrefixForModelSlug(
            $routeHelper->getRouteSlugForModelClass(get_class($model))
        );

        // Change the action to show if we don't have edit permissions
        if ( ! cms_auth()->can($permissionPrefix . 'edit')) {
            return 'show';
        }

        return 'edit';
    }
protected function determineRouteAction ( Model $ model ) { $ routeHelper = $ this -> getRouteHelper ( ) ; $ permissionPrefix = $ routeHelper -> getPermissionPrefixForModelSlug ( $ routeHelper -> getRouteSlugForModelClass ( get_class ( $ model ) ) ) ; // Change the action to show if we don't have edit permissions if ( ! cms_auth ( ) -> can ( $ permissionPrefix . 'edit' ) ) { return 'show' ; } return 'edit' ; }
Returns route action for given model.

The edit action is default, with a fallback to show if no permission is granted.

@param Model $model
@return string
Returns route action for given model .