App\Http\Requests\UpdateUserRequest::authorize PHP Method

authorize() public method

Determine if the user is authorized to make this request.
public authorize ( ) : boolean
return boolean
    public function authorize()
    {
        return Auth::user()->is_admin || $this->user()->id == Auth::user()->id;
    }
UpdateUserRequest