townhouse
townhouse copied to clipboard
create tenant error
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.
Have you installed the multi-tenant package?
composer require hyn/multi-tenant
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
Have you installed the multi-tenant package?
composer require hyn/multi-tenant
i have already instilled it. but still getting error
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.