if (Auth::guard('web')->check()) { // The user is authenticated... }
use Illuminate\Contracts\Auth\Guard; class CustomGuard implements Guard { public function check() { // Check if the user is authenticated... } }Explanation: The `check` method should be implemented in the custom guard. Package Library: Illuminate/Auth.