From da3bdaedba3d4d44078a5e6af418c2f3cb022fe3 Mon Sep 17 00:00:00 2001 From: Hessel Bierma Date: Fri, 18 Sep 2020 17:41:02 +0200 Subject: [PATCH] updates for tinker commands Laravel 8 (#84) Small update to the last command to populate the users table when using Laravel 8. --- source/docs/v3/quickstart.blade.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/docs/v3/quickstart.blade.md b/source/docs/v3/quickstart.blade.md index 89f4b5a..2df71b9 100644 --- a/source/docs/v3/quickstart.blade.md +++ b/source/docs/v3/quickstart.blade.md @@ -174,6 +174,14 @@ App\Tenant::all()->runForEach(function () { }); ``` +If you use Laravel 8, the the command is slightly different: + +```php +App\Tenant::all()->runForEach(function () { + User::factory()->create(); +}); +``` + ## Trying it out {#trying-it-out} Now we visit `foo.localhost` in our browser and we should see a dump of the users table where we see some user. If we visit `bar.localhost`, we should see a different user.