Add line breaks online tools
Introducing the tool to add a hyphen online and go to the next line according to the specified character, which can be a period or letters.
How to clear or recreate Laravel website cache, root, and config through site address. People who have experience working
How to clear or recreate Laravel website cache, root, and config through site address. People who have experience working with Laravel know that the commands are executed through artisan, but this is when your framework is not on the host and you can apply the commands through the command environment.
Now suppose we uploaded the site and wanted to cache it, what should we do?
Be careful, even if we cache the site with artisan, we must empty the cache after loading.
In any case, if we want to use the cache feature for different parts of Laravel, we need to enter the commands through the site address, but how?
First, enter the Routes folder in Laravel and edit the web file. We include all the code snippets you need below. At first, we put the cleaning method of each one.
Clearing Laravel cache via site address
//Clear Cache facade value: Route::get('/clear-cache', function() { $exitCode = Artisan::call('cache:clear'); return '<h1>Cache facade value cleared</h1>'; }); /Clear Route cache: Route::get('/route-clear', function() { $exitCode = Artisan::call('route:clear'); return '<h1>Route cache cleared</h1>'; }); //Clear View cache: Route::get('/view-clear', function() { $exitCode = Artisan::call('view:clear'); return '<h1>View cache cleared</h1>'; }); //Clear Config cache: Route::get('/config-cache', function() { $exitCode = Artisan::call('config:cache'); return '<h1>Clear Config cleared</h1>'; });
Laravel cache via site address
/Cache route: Route::get('/route-clear', function() { $exitCode = Artisan::call('route:cache'); return '<h1>Route cache</h1>'; }); //View cache: Route::get('/view-clear', function() { $exitCode = Artisan::call('view:cache'); return '<h1>View cache</h1>'; }); //Config cache: Route::get('/config-cache', function() { $exitCode = Artisan::call('config:cache'); return '<h1>Config cache</h1>'; });
Additional explanations :
To cache different parts through artisan, the following codes are used:
php artisan optimize php artisan config:cache php artisan config:clear php artisan route:cache php artisan route:clear php artisan view:cache php artisan view:clear
Source » Itroz Academy
Growing a business through an online store involves various things that we will examine. How does an online store grow a business?
Learning to view the progress of digital marketing projects in itroz will examine the process from order to completion.
We have included the required features in our website design plans along with SEO and website support to make it easier to compare and choose.
Special website design services in Toronto, Canada through the powerful and bilingual itroz panel, providing global services with payment in Rials.
Comments (0)