You may access the authenticated user via the Auth facade:
Auth
use Illuminate\Support\Facades\Auth; // Get the currently authenticated user... $user = Auth::user(); // Get the currently authenticated user's ID... $id = Auth::id();
To determine if the user is already logged into your application, you may use the check method on the Auth facade, which will return true if the user is authenticated:
check
use Illuminate\Support\Facades\Auth; if (Auth::check()) { // The user is logged in... }