Laravel working in master branch but not updating HTML in localhost - laravel

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

Related

Laravel ShouldQueue results in history issues

My EncodeVideo.php
class EncodeVideo implements ShouldQueue
The handle() function
public function handle()
{
Log::debug('handle');
gives random history versions of my Log::debug function
Sometimes it output log::debug content I changed 30 minutes ago
I tried to clear artisan cache and artisan clear queue with no success
Unfortunately, your question was not clear to me
If I understood correctly, you could solve your problem by running the following commands
(I noticed that you cleared the cache, but try again, I hope it helps)
php artisan cache:clear
php artisan queue:restart
php artisan event:clear
If it doesn't work, try this
php artisan cache:clear
php artisan view:clear
php artisan route:clear
php artisan clear-compiled
php artisan config:clear
php artisan queue:restart
php artisan event:clear
php artisan optimize:clear

Symfony\Component\Routing\Exception\RouteNotFoundException Route [games.mines] not defined. C:\private\gamble\resources\views\games\mines.blade.php)

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.

There is no existing directory at /storage/logs and its not buildable: Permission denied

I have a problem with my Laravel deployment on a OVH web server.
After made
composer update
php artisan cache:clear
php artisan route:clear
php artisan dump-autoload
I have this answer:
There is no existing directory at /storage/logs and its not buildable: Permission denied
I put all the files on 777 chmod but I have always this answer.
Please try the following commands
php artisan route:clear
php artisan config:clear
php artisan cache:clear
Note: In case you are a Homestead & VirtualBox user, please be sure that your VirtualBox is up to date.
It helped in this thread at laracasts
Clear the cache and config, then deploy to the live server.
If you've already uploaded to the live server, then you have to follow these steps:
Delete bootstrap/cache/config.php
Delete all log files in storage/logs.
You don't need to add any permission on the storage file.
The main problem here is in the compiled file, and due to which laravel try to show an error.
By default in laravel, storage file not having permission to show in the console (error
shows from the error.log file).
So the thing you need to fix is to fix compile file. which can be done thought this single command
Use this
php artisan optimize:clear
This command will clear all your cache
Compiled views
Application cache
Route cache
Configuration cache
After changing local conf i got the same error over and over,
try this, probably will help.
rm bootstrap/cache/config.php
and then
php artisan cache:clear
depending on your scenario, reloading auto-loader file can solve your issue, for that use :
composer dump-autoload
or sometimes just try :
composer install
this do the two the commands listed above.
go to your vagrant
then run
vagrant ssh
php artisan config:cache
Run the following command if you can access your server terminal
php artisan route:clear && php artisan cache:clear && php artisan config:clear && php artisan config:cache
If you are on shared hosting and cant access the terminal go to your web route file in routes/web.php and make a temporary link such as shown:
Route::get('reset', function (){
Artisan::call('route:clear');
Artisan::call('cache:clear');
Artisan::call('config:clear');
Artisan::call('config:cache');
});
Then go to http://your-domain/reset to execute the commands. there after you can now access your website as normal
If you are using homestead (vagrant) in Laravel then follow the steps #Farid shahidi provided
vagrant ssh
cd /home/vagrant/code <-- your file usually resides here; see your Homestead.yaml configuration
php artisan config:cache
You Have to try artisan command in this way
php artisan cache: clear
php artisan config:cache
php artisan cache: clear
This one-line command solves my issue:
php artisan config:cache
Delete bootstrap/cache/config.php from your laravel deployment on the server.
Please run the below commands:
php artisan route:clear
php artisan config:clear
php artisan cache:clear
This one worked for me in case your project is located within /var/www/html/
sudo chmod -Rf 0777 /var/www/html/{project-name}/bootstrap/cache
sudo chmod -Rf 0777 /var/www/html/{project-name}/storage
You need to run this command from the terminal.
php artisan config:clear
php artisan config:cache
I got the same issue, I change the permissions of the folders inside the the storage folder.
chmod 777 <folder_name>
I'm not sure about this security wise. but this resolve my problem.
I change my file settings to 755 also work for me.
try this
remove your "vendor" folder
Run "composer install" or "composer install --ignore-platform-reqs" on your cmd or terminal
php artisan config:cache
php artisan config:clear
php artisan cache:clear
php artisan route:cache
php artisan view:clear
php artisan config:cache
if you are using linux:
service apache2 restart (just in case)
if you using xammp:
just restart your xammp
For those of you using sail, do:
sail artisan optimize:clear

Laravel Performance issue in Production server

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

Reload .env constants in Laravel 5.2

I just changed a constant inside my .env file. The new value is shown up correctly with php-cli (via tinker), but not in my web app (php-fpm).
So far I've tried everything as suggested:
sudo service nginx restart
sudo service php7.0-fpm restart
sudo service php7.0-fpm reload
.
php artisan config:cache
This will generate a cache config file in bootstrap/cache/config.php
php artisan config:clear
This will remove cache config file in bootstrap/cache/config.php
php artisan cache:clear
What exactly does does ? What type of cache does it clear?
php artisan clear-compiled
This clear compile classes
composer dump-autoload
This will generate/update composer autoload file.
I have some .env variables that are not part of any config file. So it is useless for me to run any of the artisan commands.
None of the above php artisan commands don't deal directly with $_ENV.
Seems that $_ENV is stored somewhere in the server and laravel cannot update it once properties are populated.
The only solution I've found is restarting the server.
I'm running a Laravel Forge instance.
If it is cached and you need to reload it you can simply use:
php artisan config:clear
This will pull in any changes that you have since made.
Try to delete the config on file on: Bootstrap/cache/config.php
AS well you can try: php artisan config:cache or php artisan cache:clear

Resources