App\Services\Auth\User::isCurrentUser PHP Method

isCurrentUser() public method

public isCurrentUser ( ) : boolean
return boolean
    public function isCurrentUser() : bool
    {
        if (!$this->id) {
            return false;
        }
        if ($this->guardDriver() !== config('auth.defaults.guard')) {
            return false;
        }
        return $this->id === auth()->id();
    }