Laravel ClassLoader trying to load an old version of my model -


so while decided redo 1 of models in laravel completely, wanted hold on original copy of file in case. renamed mymodel (old).php , left there in models folder next new model.

now understand laravel bit better, realize wasn't great idea, in case seemed work months. today, made minor update (modifying database query) 1 of functions in new model , laravel trying load old copy of model. moved old copy out of models folder , backup folder outside of laravel application, laravel throws error:

include(pathtomymodels/mymodel (old).php): failed open stream: no such file or directory 

referring section of classloader.php

/** * scope isolated include. * * prevents access $this/self included files. */ function includefile($file) { include $file; } 

i tried undoing modification model, changing route , controller function name, clearing laravel's cache, clearing browser cache, using different browsers, nothing seems work except manually include model's php file before calling class contains. can laravel automatically recognize model others have?

try clear composer cache , run composer dump-autoload.

composer clear-cache composer dump-autoload 

Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -