user providers laravel code example
Example 1: check if logged laravel
use Illuminate\Support\Facades\Auth;
if (Auth::check()) {
// The user is logged in...
}
Example 2: laravel get auth user id
// Get the currently authenticated user's ID...
$id = Auth::id();