Update quickstart.blade.md

This commit is contained in:
huzzi 2023-03-03 20:54:48 +00:00 committed by GitHub
parent 46a2352885
commit e367dc3156
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -164,6 +164,7 @@ These routes will only be accessible on tenant (non-central) domains — the `Pr
Let's make a small change to dump all the users in the database, so that we can actually see multi-tenancy working. Open the file `routes/tenant.php` and apply the modification below: Let's make a small change to dump all the users in the database, so that we can actually see multi-tenancy working. Open the file `routes/tenant.php` and apply the modification below:
```php ```php
Route::get('/', function () { Route::get('/', function () {
dd(\App\Models\User::all()); dd(\App\Models\User::all());
@ -192,6 +193,8 @@ $ php artisan tinker
Now we'll create a user inside each tenant's database: Now we'll create a user inside each tenant's database:
Please run **php artisan tenants:migrate** before you create the users otherwise you will get an error.
```php ```php
App\Models\Tenant::all()->runForEach(function () { App\Models\Tenant::all()->runForEach(function () {
App\Models\User::factory()->create(); App\Models\User::factory()->create();