Hi i just put my app in production and the laravel application is very slow, even slow then in my local server.
May i know any trips and tricks to increase peformance.
Run this in command line to boost the performance
composer dump-autoload
php artisan clear-compiled
php artisan config:cache
php artisan route:cache
php artisan optimize --force
Related
I am new in laravel development. I am using latest version 9 of laravel, when I write php artisan serve in git bash or in VS code terminal after sometime it gives an error. I attached a screenshot of an error.
run php artisan optimize command
composer install
composer update
php artisan optimize:clear
This will clear all the cache of the application
enter image description here
so when i open my laravel i get this error: Symfony\Component\Routing\Exception\RouteNotFoundException
Route [games.mines] not defined. (View: C:\private\gamble\resources\views\games\mines.blade.php)
but when i remove the line: mines. my page will load in.
and im completely lost in how to fix this.
basically i just want to add a header with a button to my mines. the button to dashboard works fine
The standard procedure to clear the Laravel cache is:
php artisan cache:clear
php artisan view:clear
php artisan route:cache
php artisan config:cache
php artisan optimize
This is according to the following article: https://beyondco.de/blog/laravel-caches-and-all-ways-to-clear-them
You can try typing these instructions from the command terminal:
php artisan cache:clear
php artisan view:clear
php artisan route:cache
php artisan config:cache
php artisan optimize
You may have a problem with the Laravel cache, these commands will clear the Laravel cache.
My Laravel project randomly shows connection refused exception, but it was working before, so I type
php artisan config:cache
and the error disappear, but after that, it throws View not found exception I ran
php artisan config:cache
again without success. After that, I type
php artisan route:cache
php artisan route:clear
php artisan clear-compiled
composer dump-autoload
but the exception View not found still there, so I don`t know what else to do.
I use vagrant with Homestead 7.
NOTE: Yesterday I migrate my installation to a fresh one because the same problem, but today it appears again.
well, after many attempts i ran
php artisan cache:clear
and the problem is now gone.
I've just installed Laravel 5.3. php artisan serv also runs.
But as I hit http://localhost:8000/ on browser I get a RuntimeException.
Is there any solution to prevent this error?
Create cipher key by this command
php artisan key:generate
Then run server
php artisan serve
To avoid this problem always use composer for creating project.
Ex. composer create-project laravel/laravel your_project_name --prefer-dist
if you create project by composer then need not to run this command.
php artisan key:generate
I'm working in my master branch on my computer locally. I've updated some HTML and I'm loading the page up in localhost. However, the HTML is not being updated but my CSS is, what do I do? I haven't had this problem before!
Try
php atrisan config:cache
on your terminal. May be the page serving from cache that's why not reflecting the changes.
Try to execute this commands to remove the caches:
php artisan clear-compiled
php artisan cache:clear
php artisan config:clear
php artisan route:clear
php artisan view:clear
composer dump-autoload
php artisan optimize