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:cache
PHP 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.
The above is the site (tanteng.me) and blog used to improve the speed of the website tips.