townhouse icon indicating copy to clipboard operation
townhouse copied to clipboard

create tenant error

Open rashmika018 opened this issue 6 years ago • 4 comments

When i try to create tenant getting error

tenancy>php artisan tenant:create boise [email protected]

Symfony\Component\Debug\Exception\FatalThrowableError : Class 'Hyn\Tenancy\Models\Customer' not found

at tenancy\app\Console\Commands\CreateTenant.php:46 42| } 43| 44| private function tenantExists($name, $email) 45| {

46| return Customer::where('name', $name)->orWhere('email', $email)->exists(); 47| } 48| 49| private function registerTenant($name, $email) 50| {

Exception trace:

1 App\Console\Commands\CreateTenant::tenantExists("boise", "[email protected]") tenancy\app\Console\Commands\CreateTenant.php:27

2 App\Console\Commands\CreateTenant::handle() tenancy\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:29

Please use the argument -v to see more details.

rashmika018 avatar Feb 23 '19 07:02 rashmika018

Have you installed the multi-tenant package? composer require hyn/multi-tenant

sevillaarvin avatar Feb 27 '19 21:02 sevillaarvin

i follow all steps you are mention on your blog (https://medium.com/@ashokgelal/a-full-featured-multi-tenant-app-with-laravel-part-1-4049a3cc229) whenever i try to run "php artisan tenant:create boise [email protected]" this command on my cmd getting above error

rashmika018 avatar Apr 18 '19 05:04 rashmika018

Have you installed the multi-tenant package? composer require hyn/multi-tenant

i have already instilled it. but still getting error

rashmika018 avatar Jun 28 '19 06:06 rashmika018

Maybe the version you've installed is > 5.1? As mentioned in the 5.2 docs, the Customer model has been dropped. If you still want to follow the instructions in the blog make sure you have version 5.1. Otherwise, find another tutorial with a more recent version.

P.S. As of today, I can't access the linked medium blog.

sevillaarvin avatar Jun 28 '19 11:06 sevillaarvin