fdt2k / kda-webshop
2.0.0
2022-03-16 12:23 UTC
Requires
- php: ^7.3|^8.0
- fdt2k/laravel-package-service-provider: dev-master-2 || ^2.0
- laravel/framework: ^9.0
- laravel/ui: 4.x-dev
This package is auto-updated.
Last update: 2024-09-16 16:56:22 UTC
README
客户认证
sail artisan vendor:publish --provider="KDA\Webshop\CustomerProvider" --tag="config" --force
安装
配置Laravel认证保护器 要启用认证,您需要在config/auth.php中添加配置
'guards' => [
...
'customers'=> [
'driver' => 'session',
'provider' => 'users' // <- change this if you need another model
]
...
],
如果您需要使用另一个模型
'providers' => [
...
'users' => [
'driver' => 'eloquent',
'model' => App\Models\Customer::class,
],
...
],
在您的模型中(默认模型或自定义模型),您必须声明保护器
class User extends Authenticatable
{
protected $guard_name = 'customers';