Middleware in Laravel 11
HTML-код
- Опубликовано: 23 сен 2024
- In this tutorial, you will learn how to use middleware in laravel 11 application. so, this tutorial covers creating, registering, and assigning middleware to a route and globally.
#laravel #MiddlewareInLaravel #middleware
Without a single word has explained the topic. Very interesting format of the tutorial. And yes, i have found what i searched for. Thanks!
I'm glad to hear that. :)
Thank you so much!
@@BluebirdTech I noticed you have auto update of the use of namespaces as soon as you mention class in your code , how ?
nice!!!❤
such a helpful tutorial.
thanks!
Came from Facebook ❤ love it
How to log api of users
// bootstrap/app.php
$middleware->api(append:[
\App\Http\Middleware\YourAPIMiddleware::class,
]);
//YourAPIMiddleware
Log::info('API Request from user: ' . auth()->user()->id);
Log::info('Request URL: ' . $request->fullUrl());
Log::info('Request Method: ' . $request->method());
Log::info('Request Parameters: ' . json_encode($request->all()));
ты крутой