4

I am very new to php and laravel development. I am working on an existing php+laravel project. and I am trying to understand how it works. the existing application is working fine.. but when I make some changes to the php files in models, controller folder, the changes are not reflected in the output.

what command should I run to build everything?

thanks

3
  • you should make an example, post some codes, to make your problem clearly Commented Sep 17, 2014 at 4:04
  • For example: lets say I have employee.php in my app/models folder.. I will comment the whole code inside this file.. now I am expecting my application to throw an error or atleast shouldnt show the employee details.. but my code is still working fine as before showing employee details.. my question is what is that procedure to be done once you make some changes to your code? What i did is - 1. made changes to the code. 2. restarted apache server. I believe there is an intermediate step which I am missing. Commented Sep 17, 2014 at 4:30
  • It will work immediately if you comment your codes in the right place, you don't need to restart apache. So I think maybe you commented codes in wrong file. Commented Sep 17, 2014 at 4:51

2 Answers 2

4

I've experienced this a few times myself, and the reason was that my cached view had not been updated. Try emptying the following folders:

/app/storage/cache
/app/storage/views

No need to restart the web-server.

Note! Some of the storage folders may contain a git placeholder, such as a .gitkeep file, it get git to commit "empty" folders. Don't delete that file, if you need the folder to get committed.


Update: You can use the artisan command view:clear to clear the cached views, instead of emptying the folders yourself.

Sign up to request clarification or add additional context in comments.

Comments

1

I have encountered this problem on my linux machine.

What I did was restart ngnix (service ngnix restart) and also restart php (service php5-fpm restart) and now the changes are showing again.

2 Comments

Hi #Cosmin Bacanu, this solution helped why is it that you needed to restart php to reflect the changes?
Unfortunately, I dont know why it worked. I just tried a lot of things and this is what ended up working.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.