โ˜… Making sure routes, config and events of your Laravel app are cached in production

1 ยท Freek Van der Herten ยท July 18, 2022, 12:04 p.m.
A typical Laravel application will likely have many routes, config files and possibly some events. In your development environment, these routes and config files will be loaded and registered in each request. The performance penalty for this is not too big. In a production environment, you want to cache these things. Laravel makes this easy by offering a couple of Artisan commands you can use in your deployment procedure. php artisan optimize # will cache routes and config php artisan event:cach...