1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?php
- /**
- * Created by PhpStorm.
- * User: hony
- * Date: 2018/1/19
- * Time: 14:35
- */
- 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' => 'api',
- 'passwords' => 'users',
- ],
- /*
- |--------------------------------------------------------------------------
- | Authentication Guards
- |--------------------------------------------------------------------------
- |
- | Next, you may define every authentication guard for your application.
- | Of course, a great default configuration has been defined for you
- | here which uses session storage and the Eloquent user provider.
- |
- | All authentication drivers have a user provider. This defines how the
- | users are actually retrieved out of your database or other storage
- | mechanisms used by this application to persist your user's data.
- |
- | Supported: "session", "token"
- |
- */
- 'guards' => [
- 'api' => [
- 'driver' => 'jwt',
- 'provider' => 'users',
- ],
- 'admin' => [
- 'driver' => 'jwt',
- 'provider' => 'admins',
- ]
- ],
- 'providers' => [
- 'users' => [
- 'driver' => 'eloquent',//这里是因为我用的mysql做的测试
- 'model' => App\Models\User::class,
- ],
- 'admins' => [
- 'driver' => 'eloquent',
- 'model' => App\Models\Admin::class,
- ],
- ],
- ];
|