How to Handle Sanctum Error in Laravel 11
<?php use IlluminateSupportFacadesRoute; Route::prefix(‘admin’)->group(function () { Route::post(‘/login’, [AppHttpControllersAdminAuthController::class, ‘login’]); Route::middleware(‘auth:admin_sanctum’)->group(function () { Route::post(‘/logout’, [AppHttpControllersAdminAuthController::class, ‘logout’]); }); }); auth.php – ‘guards’ => [ ‘sanctum’ => [ ‘driver’ => ‘sanctum’, ‘provider’ => ‘users’, ], ‘user_sanctum’ => [ ‘driver’ => ‘sanctum’, ‘provider’ => ‘users’, ], ‘admin_sanctum’ => [ ‘driver’ => ‘sanctum’, ‘provider’ => ‘admins’, ], ], ‘providers’ => […]
Laravel 11 Using custom guards result in IlluminateAuthRequestGuard::attempt does not exists
While I am testing out custom Auth guard with the following code, I got the error below.
Laravel Taking 30s to Respond
My code was working fine with optimum speed then it decided to be slow suddenly
taking almost 30s to just do 5 querrys
It shows on the debugbar that the querrys take 50ms which is fine..
Idk where is the slowdown coming from
How to implement Service Provider Update In Laravel 11 Upgrade Guide
I’m upgrading our current system from Laravel 10 to 11 and I am not updating our application structure to the new structure. I already done all the upgrade things except for 1 item.
Laravel 11 – disable all of the “Set-Cookie” headers? (XCSRF + Laravel Session)
I have an issue with Laravel 11.x, that now you no longer have the middlewares in the Kernel file, thus I don’t see a way to entirely remove the session and xcsrf set-cookie headers.
How to disable CSRF token in Laravel 11?
I am working on a new project in Laravel 11 and need to disable CSRF protection for all routes. In Laravel 10, I achieved this by modifying the VerifyCsrfToken.php file
Target class [permission] does not exist
I am using laravel 11 and trying use spatie laravel permission
Auth attempt allowed password field only in laravel
I am trying to login in laravel using this method
Laravel 11 not executing Policy
So I have a Model, Middleware and a Policy.
The problem is that I seem to can not get the policy to work correctly.
Make custom sessions table for additional user in laravel 11
I’m building a site where I have two different users, the backend user which is laravel’s default and frontend user for members and they have their own member area. The default user is from users table and members are from member table. Each has their own guards.