fdt2k/kda-webshop

2.0.0 2022-03-16 12:23 UTC

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';

订单

产品

购物车