Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

cartman780's avatar

cartman780 wrote a comment+100 XP

1mo ago

Laravel From Scratch (2026 Edition): Ep 22, How to Get Started Testing Your Code

At first "php artisan test" worked, but "pest" didn't. So i followed the steps to install it like Jeffrey from the Pest install documentation and now "php artisan test" is broken.

C:\laragon\www\wldr>pest 'pest' is not recognized as an internal or external command, operable program or batch file.

C:\laragon\www\wldr>php artisan test

Error

Class "SebastianBergmann\Environment\Console" not found

Also after running "composer remove phpunit/phpunit composer require pestphp/pest --dev --with-all-dependencies" it says there should be a Pest.php configuration file. Witch i can not find. How did i manage to mess this up in te first steps?

cartman780's avatar

cartman780 wrote a comment+100 XP

1mo ago

Laravel From Scratch (2026 Edition): Ep 20, Notifications

Hi Jeffrey,

I follow the exact same steps, but i get this error in tinker:

$john = App\Models\User::first()->notifications
= Illuminate\Notifications\DatabaseNotificationCollection {#6495 all: [], }

$john->notify(new App\Notifications\IdeaPublished(App\Models\Idea::first()));

BadMethodCallException Method >Illuminate\Notifications\DatabaseNotificationCollection::notify does not exist.

Wat did i do wrong or wat do i do now?

cartman780's avatar

cartman780 wrote a comment+100 XP

1mo ago

Laravel From Scratch (2026 Edition): Ep 18, Authorization Using Policies

Hi Jeffrey,

When i follow the exact same steps. I some times run into a problems that you not seem to get in your videos and i do not know why.

For example when you add the "? Response::allow()..." to the return of the update policy i get a type error "App\Policies\IdeaPolicy::update(): Return value must be of type bool, Illuminate\Auth\Access\Response returned".

When i remove the ":bool" as a return type it does work, but why do you not get that error?

cartman780's avatar

cartman780 wrote a comment+100 XP

2mos ago

cartman780's avatar

cartman780 wrote a comment+100 XP

2mos ago

Laravel From Scratch (2026 Edition): Ep 8, Databases, Migrations, and Eloquent

How come you can use Idea::create without the create function in de model? I get a swiggly line under create saying "Method create not found in App/models/Idea". Did i miss something?