小编Eve*_*Adm的帖子

如何在 laravel 5.6 中更改 tymon jwt 身份验证以使用成员模型而不是用户模型?

在我的项目中,我有用户和成员表以及雄辩的模型。我将在成员表中使用 jwt 身份验证,并更改了相应的配置文件,但它仍然转到用户模型。

这是config/auth.php

return [

/*
|--------------------------------------------------------------------------
| Authentication Defaults
|--------------------------------------------------------------------------
|
| This option controls the default authentication "guard" and password
| reset options for your application. You may change these defaults
| as required, but they're a perfect start for most applications.
|
*/

'defaults' => [
    'guard' => 'web',
    'passwords' => 'users',
],

/*
|--------------------------------------------------------------------------
| Authentication Guards
|--------------------------------------------------------------------------
|
| Next, you may define every authentication guard for your application.
| Of course, …
Run Code Online (Sandbox Code Playgroud)

php jwt laravel eloquent laravel-5.6

5
推荐指数
1
解决办法
3174
查看次数

标签 统计

eloquent ×1

jwt ×1

laravel ×1

laravel-5.6 ×1

php ×1