Déployer une application Laravel

De Gandal
Révision datée du 28 mars 2024 à 10:19 par Abdoulaye (discussion | contributions) (Page créée avec « == 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 <code>.env</code> file: #* <code>APP_ENV=production</code> #* <code>APP_DEBUG=false</code> # Make sure that you are optimizing Composer's class autoloader map (docs): #* <code>composer dump-autoload --optimize</code> #* or along install: <code>composer install --optimize-autoloader --no... »)
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)

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

  1. Apply changes to .env file:
    • APP_ENV=production
    • APP_DEBUG=false
  2. 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
  3. Optimizing Configuration Loading:
    • php artisan config:cache
  4. Discover and cache the application's events and listeners:
    • php artisan event:cache
  5. Optimizing Route registration:
    • php artisan route:cache
  6. Compile all of the application's Blade templates:
    • php artisan view:cache
  7. Cache the framework bootstrap files:
    • php artisan optimize