PHP 8.3.31
Preview: GuardHelpers.php Size: 2.48 KB
/home/getspomw/royalsquad.us/vendor/laravel/framework/src/Illuminate/Auth/GuardHelpers.php

<?php

namespace Illuminate\Auth;

use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\UserProvider;

/**
 * These methods are typically the same across all guards.
 */
trait GuardHelpers
{
    /**
     * The currently authenticated user.
     *
     * @var \Illuminate\Contracts\Auth\Authenticatable|null
     */
    protected $user;

    /**
     * The user provider implementation.
     *
     * @var \Illuminate\Contracts\Auth\UserProvider
     */
    protected $provider;

    /**
     * Determine if the current user is authenticated. If not, throw an exception.
     *
     * @return \Illuminate\Contracts\Auth\Authenticatable
     *
     * @throws \Illuminate\Auth\AuthenticationException
     */
    public function authenticate()
    {
        return $this->user() ?? throw new AuthenticationException;
    }

    /**
     * Determine if the guard has a user instance.
     *
     * @return bool
     */
    public function hasUser()
    {
        return ! is_null($this->user);
    }

    /**
     * Determine if the current user is authenticated.
     *
     * @return bool
     */
    public function check()
    {
        return ! is_null($this->user());
    }

    /**
     * Determine if the current user is a guest.
     *
     * @return bool
     */
    public function guest()
    {
        return ! $this->check();
    }

    /**
     * Get the ID for the currently authenticated user.
     *
     * @return int|string|null
     */
    public function id()
    {
        if ($this->user()) {
            return $this->user()->getAuthIdentifier();
        }
    }

    /**
     * Set the current user.
     *
     * @param  \Illuminate\Contracts\Auth\Authenticatable  $user
     * @return $this
     */
    public function setUser(AuthenticatableContract $user)
    {
        $this->user = $user;

        return $this;
    }

    /**
     * Forget the current user.
     *
     * @return $this
     */
    public function forgetUser()
    {
        $this->user = null;

        return $this;
    }

    /**
     * Get the user provider used by the guard.
     *
     * @return \Illuminate\Contracts\Auth\UserProvider
     */
    public function getProvider()
    {
        return $this->provider;
    }

    /**
     * Set the user provider used by the guard.
     *
     * @param  \Illuminate\Contracts\Auth\UserProvider  $provider
     * @return void
     */
    public function setProvider(UserProvider $provider)
    {
        $this->provider = $provider;
    }
}

Directory Contents

Dirs: 7 × Files: 16

Name Size Perms Modified Actions
Access DIR
- drwxrwxrwx 2025-09-17 06:52:56
Edit Download
Console DIR
- drwxrwxrwx 2025-09-17 06:52:56
Edit Download
Events DIR
- drwxrwxrwx 2025-09-17 06:52:56
Edit Download
Listeners DIR
- drwxrwxrwx 2025-09-17 06:52:56
Edit Download
- drwxrwxrwx 2025-09-17 06:52:56
Edit Download
- drwxrwxrwx 2025-09-17 06:52:56
Edit Download
Passwords DIR
- drwxrwxrwx 2025-09-17 06:52:56
Edit Download
2.12 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
1.81 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
8.31 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
3.04 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
1.24 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
2.43 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
5.51 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
7.05 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
2.69 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
2.48 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
1.05 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
979 B lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
1.83 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
2.10 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
27.28 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download
3.42 KB lrw-rw-rw- 2025-09-17 06:52:56
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).