I have very simple application in Laravel 5.5.
My Route : Route::resource('books', 'BookController');
My Controller is app/http/Controllers/BookController.php
My Model is app/Book.php
I have similar other modules as well.
INTERESTING PART IS :
My Book controller changes are not being reflected in browser.
I thought of clearing the cache so cleared all caches.
1. Cleared Application Cache > php artisan cache:clear
2. Cleared Route Cache > php artisan route:clear
3. Cleared Configuration Cache > php artisan config:clear
4. Cleared Compiled Views Cache > php artisan view:clear
I was not sure which cache was causing the issue so I cleared all. Still my changes are not being reflected in the browser, but when I change the view files, the changes are being reflected.
Any Suggestion please?????
Finally I guess I have found the solutions. All the files are being cached in this location
/home/project/public_html/vendor/composer/autoload_classmap.php
where project = project name
So if we change the file name, then we need to run the following commands.
php artisan clear-compiled
composer dump-autoload
php artisan optimize
Since the above bug ruins my past 2 days, so I guess its worth sharing for someone having the same issue or problem.
**Please correct me if above solution can be optimized.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With