mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 02:04:03 +00:00
Update quickstart.blade.md
This commit is contained in:
parent
46a2352885
commit
e367dc3156
1 changed files with 3 additions and 0 deletions
|
|
@ -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:
|
||||
|
||||
|
||||
```php
|
||||
Route::get('/', function () {
|
||||
dd(\App\Models\User::all());
|
||||
|
|
@ -192,6 +193,8 @@ $ php artisan tinker
|
|||
|
||||
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
|
||||
App\Models\Tenant::all()->runForEach(function () {
|
||||
App\Models\User::factory()->create();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue