Adding custom guard for Customer Module #2070
Unanswered
devahmedadli
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I created a new module "Customer", and when I am trying to check if the customer is authenticated using the next code
auth('sanctum')->check())
or
auth('customer')->check())
i get this error message
'/vendor/composer/../../app/Models/Customer.php): Failed to open stream: No such file or directory'
I have add a guard in the auth.php in the default laravel config directory
'providers' => [ 'users' => [ 'driver' => 'eloquent', 'model' => App\Models\User::class, ], 'customers' => [ 'driver' => 'eloquent', 'model' => Modules\Customer\Models\Customer::class, ], ],
Beta Was this translation helpful? Give feedback.
All reactions