conedevelopment / bazar

Bazar is an e-commerce package for Laravel applications.
https://root.conedevelopment.com
MIT License
427 stars 57 forks source link

Auth error after install and login #134

Closed cheello closed 3 years ago

cheello commented 3 years ago

Description:

Auth error bazar panel after login in app - 'manage-bazar'

Bazar\BazarServiceProvider::Bazar\{closure}
vendor/conedevelopment/bazar/src/BazarServiceProvider.php:226
    protected function registerAuth(): void

    {

        Gate::define('manage-bazar', static function (Contracts\Models\User $user): bool {

            return $user->isAdmin();

        });

    }

Steps To Reproduce:

install laravel, bazar, (breeze, jetstream, laravel ui), login in app (admin@bazar.test).

iamgergo commented 3 years ago

Thanks for the report!

Have you extended your default App\Models\User model with Bazar\Models\User?

Docs: https://bazar.conedevelopment.com/docs/installation#extending-the-user-model

cheello commented 3 years ago

My bad, I didn't take the last step. Thank you!