Déployer une application Laravel
De Gandal
Cloner le projet
Vous devez commencer par mettre envoyer tous vos fichiers sur le serveur de production par git ou ftp ou autres moyens.
Commandes
- Apply changes to
.envfile:APP_ENV=productionAPP_DEBUG=false
- Make sure that you are optimizing Composer's class autoloader map (docs):
composer dump-autoload --optimize- or along install:
composer install --optimize-autoloader --no-dev - or during update:
composer update --optimize-autoloader
- Optimizing Configuration Loading:
php artisan config:cache
- Discover and cache the application's events and listeners:
php artisan event:cache
- Optimizing Route registration:
php artisan route:cache
- Compile all of the application's Blade templates:
php artisan view:cache
- Cache the framework bootstrap files:
php artisan optimize
