Laravel - The PHP Framework For Web Artisans

contenido

Authenticating users is as simple as adding an authentication middleware to your Laravel route definition:

Route::get('/profile', ProfileController::class)

->middleware('auth');

Once the user is authenticated, you can access the authenticated user via the Auth facade:

use Illuminate\Support\Facades\Auth;

// Get the currently authenticated user...

$user = Auth::user();

Of course, you may define your own authentication middleware, allowing you to customize the authentication process.

For more information on Laravel's authentication features, check out the authentication documentation.

Resumir
In Laravel, authenticating users involves adding an authentication middleware to route definitions. Once authenticated, users can be accessed using the 'Auth' facade. Custom authentication middleware can also be defined for a personalized authentication process. For further details on Laravel's authentication capabilities, refer to the authentication documentation on the Laravel website.