Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

php artisan serve get cached or does not react while updating code in Laravel 5.5. After a restart, it works again each time

My IDE is phpstorm and running on WAMP Server. While coding, it does not show the expected response, always returns the previously requested response (In postman). Each time, I need to close 'php artisan serve' with CTRL+C and then run again to get the expected response.

I tried changing IDE, changing port but it does not work. Of course, I tired to save manually ( CTRL+S) but the problem persists.
I also tried the following commands:

php artisan cache:clear
php artisan config:clear
php artisan route:clear
composer dump

But the problem still persists.

like image 885
Masiur Rahman Siddiki Avatar asked Jul 30 '18 15:07

Masiur Rahman Siddiki


1 Answers

The issue might be the composer command. Please, have a look on my setup in the Makefile:

run:
    php artisan config:cache
    php artisan config:clear
    php artisan cache:clear
    composer.phar dump-autoload -o
    php artisan serve

And it's ready to go with a Laravel's "clean build".

like image 95
Tiago Mateus Avatar answered Oct 13 '22 00:10

Tiago Mateus