fdt2k/laravel-cart

1.0.23 2024-04-11 20:27 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';

订单

产品

购物车