fdt2k / laravel-cart
1.0.23
2024-04-11 20:27 UTC
Requires
- php: ^7.3|^8.0
- fdt2k/laravel-guest-to-member: dev-main
- fdt2k/laravel-package-service-provider: dev-dev-v2 ||^2.0
- spatie/laravel-activitylog: ^4.4
Requires (Dev)
- orchestra/testbench: ^6.0
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';