use Illuminate\Support\Facades\Auth; // attempt to authenticate the user if (Auth::attempt(['email' => $email, 'password' => $password])) { // authentication successful } else { // authentication failed }
use Illuminate\Support\Facades\Auth; if (Auth::check()) { // user is authenticated } else { // user is not authenticated }
use Illuminate\Support\Facades\Auth; $user = Auth::user();
use Illuminate\Support\Facades\Auth; Auth::logout();The package library for this facade is the Illuminate/Auth package, which is a component of the Laravel framework.