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

ArneBAR1's avatar

PHP Fatal error: Trait "Illuminate\Support\Traits\Macroable" not found

Hey everytime I try to run "php artisan serve" i get this error:

Fatal error: Trait "Illuminate\Support\Traits\Macroable" not found in C:\Users\akd\thisdrive\Skrivebord\Kanban\Kanbanboard\vendor\laravel\framework\src\Illuminate\Foundation\Application.php on line 32

When I look in the file I see that it has "use Illuminate\Support\Traits\Macroable". How can I fix this issue?

0 likes
10 replies
Sinnbeck's avatar

Try deleting /vendor and do composer install

Sinnbeck's avatar

Did you try this? Does it give the same error afterwards?

lbecket's avatar

Run composer update in your project's root directory to download and install the missing dependency.

azimidev's avatar

Delete vendor directory and composer.lock try running composer install to reinstall all the dependencies. if you still have the issues run php artisan config:cache && php artisan route:cache

2 likes
olegos's avatar

@azimidev Dude, I signed up for this site just to tell you - THANK YOU!!! After upgrading my site from Laravel 8 to 9 - got 500 server error. Tried to roll back with full server restore - same problem. Until I found your post, I thought I am f***ed. THANKS AGAIN!

1 like
ArneBAR1's avatar
ArneBAR1
OP
Best Answer
Level 1

Hey so I found out the issue. It was my harddrive that had a problem and made it so the files where not working probably. But thanks for all the replies and suggestions :)

Please or to participate in this conversation.