vanilophp / framework

The truly Laravel E-commerce Framework
https://vanilo.io
MIT License
809 stars 102 forks source link

InvalidArgumentException on New Install #133

Closed darrylmorley closed 2 years ago

darrylmorley commented 2 years ago

Hi,

I followed the instructions to get started but get an InvalidArgumentException Error when running php artisan serve

Class App\Models\User must extend or implement Konekt\User\Contracts\User.

My User.php:

<?php

// app/User.php
namespace App;

// No need to use Laravel default traits and properties as
// they're already present in the base class exactly as
// they're defined in a default Laravel installation
class User extends \Konekt\User\Models\User
{
}

And I have added the below to the boot method in AppServiceProvider.php:

 $this->app->concord->registerModel(\Konekt\User\Contracts\User::class, \App\Models\User::class);
darrylmorley commented 2 years ago

Fixed by updating the namespace in User.php

namespace App\Models;