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

bodyshadyy's avatar

server 500 when i run php artisan serve

i am using github codespace anduse the code from the larvel in 30 days rep I do composer install and update and I don't see any error but when I open local host it just shows 500 server error I even tried php -S localhost:7000 -t public/ but all I get is GET/ in red

0 likes
7 replies
bodyshadyy's avatar

@jlrdw I dont think the problem is in port when I run composer create-project laravel/laravel example-app and then PHP artisan serve it loads the website

Tray2's avatar

Sounds to me that you have some error in your code, there must be more information about the problem than just "500 error"

1 like
bodyshadyy's avatar

@Tray2 thank you so muc but now after i generated the api key I get View [components.layout] not found.

should I make a new post or continue on this one

Tray2's avatar

@bodyshadyy That file should be there if you have cloned the repository. However, check this path from your document root. /resources/views/components/ for layout.blade.php. It should be there therwise create it, and yes, it's a different issue, so you should create a new thread.

1 like

Please or to participate in this conversation.