Creating authentication error with Laravel Sanctum

41 views Asked by At

I have 2 sections in my website. I used laravel spatie for admin and laravel/sanctum for frontend. When I use Postman to check front end routes instead showing error "You have not access to this page" redirect to admin login page!

LoginController.php

 protected function redirectTo()
    {
        if (!Auth::check()) {
                      return route('admin_login');
        }
    }

enter image description here

But I want to separate Spatie error and Sanctum error

0

There are 0 answers