Laravel is a powerful framework, many components, code is also very large, its ease of use is sacrificing performance, even though it is still an excellent framework, but in the formal environment to optimize the speed of the site to improve.
1. Turn off debug
Open the. env file and set debug to False.
app_env=Localapp_debug=falseApp_key=base64:st/atfeae13eyao1raee6jc9ff+yle1se+ wtyk0h6b4=
2. Cache Routing and Configuration
PHP Artisan route:cachephp Artisan Config:cache
3.Laravel optimization Command
PHP Artisan Optimize
4.composer optimization
sudo composer Dump-autoload optimize
5. Using the Laravel cache
Using the Laravel cache method caches content, comes with file cache, database cache, Redis cache, or can be combined with Predis components or multiple caches using Redis. It is so elegant and convenient to use in Laravel:
$lists = Cache::remember ('travel.destination.lists', function () { return $this->destination->getList ();});
6. Using CDN
This site is seven cattle CDN, send you a monthly 20G traffic and 20G storage space, how much do not remember, in short, for a small station is completely enough.
Http://blog.tanteng.me/2016/06/laravel-optimize/?utm_source=tuicool&utm_medium=referral
Optimize Laravel website Opening speed