title: Laravel artisan optimize Best Practices
body: <p>I'm trying to fully understand the Laravel (5.1) <code>artisan optimize</code> command and best practices, but the documentation seems lacking. I don't have Composer installed on the production server so, specifically, I want to know what files are modified or created when running <code>artisan optimize --force</code> on development that must get pushed to production. The goal being not to blow up the app in production! After running the command, I see the following files have been modified:</p>
  
  <pre><code>\bootstrap\cache\compiled.php
  \vendor\composer\ - the entire directory
  \vendor\autoload.php
  </code></pre>
  
  <p>Am I overthinking this, or do I just push these files to production and I'm good to go? Also, what is the best practice regarding when to run <code>artisan optimize</code>? Each time a new model is created? What about controllers, routes and helper classes? </p>
  
  <p>Lastly, I see the <code>\bootstrap\cache\compiled.php</code> file is a whopping 548KB and almost 17K lines! Is that really considered optimal?</p>