Error Class ‘Illuminate\Database\Grammar’ not found

Today i updated RolandRadio.net because i had some new packages i wanted to use. On my local Laravel instalation everything worked fine but after uploading the new changed files i got an error:

Error Class ‘Illuminate\Database\Grammar’ not found

I didn’t figured out how to fix this and suggested that it has soething to do with updates of laravel that occured during my development and so the local laravel version and the version on my webserver where different.

After uploading all the files again completely instead of only the different ones the website worked again. Maybe my FTP-Client has messed up some files. As the Upload of those files takes about 2,5 hours i should think about using GIT to avoid those long downtime and commit my changes more often to the GIT repository then.

How to disable the Cache in Laravel

Sometimes its necessary to disable the caching in Laravel. To do so a new cache-driver “none” must be added to the cache-configuration-file in config/cache.php

'stores' => [
    //...
    'none' => [
        'driver' => 'null',
    ],
  ],

After that you have to set this cache-driver in your .env-File and you Cache is disabled

Edit .env and change the line
CACHE_DRIVER=file
to
CACHE_DRIVER=none

Clearing some Caches in Laravel

Clear Application Cache:

php artisan cache:clear

Clear Route Cache

Throws an error if CACHE_DRIVER=none

php artisan route:clear

Clear Configuration Cache

Throws an error if CACHE_DRIVER=none

php artisan config:clear 

 Clear Compiled Views Cache

Throws an error if CACHE_DRIVER=none

php artisan view:clear