fdt2k/kda-webshop

2.0.0 2022-03-16 12:23 UTC

This package is auto-updated.

Last update: 2024-11-16 17:23:00 UTC


README

Customers Auth

sail artisan vendor:publish --provider="KDA\Webshop\CustomerProvider" --tag="config" --force

Install

Configure Laravel auth guard To enable auth, you have to add config/auth.php

'guards' => [
    ...
    'customers'=> [
        'driver' => 'session',
        'provider' => 'users' // <- change this if  you need another model
    ]
    ...
],

If you need to use another model

'providers' => [
    ...
    'users' => [
        'driver' => 'eloquent',
        'model' => App\Models\Customer::class,
    ],
    ...

],

in your model (the default one or the custom one), you have to declare the guard

class User extends Authenticatable
{

    protected $guard_name = 'customers';

Orders

Products

Basket