artisan 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #!/usr/bin/env php
  2. <?php
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Register The Auto Loader
  6. |--------------------------------------------------------------------------
  7. |
  8. | Composer provides a convenient, automatically generated class loader
  9. | for our application. We just need to utilize it! We'll require it
  10. | into the script here so that we do not have to worry about the
  11. | loading of any our classes "manually". Feels great to relax.
  12. |
  13. */
  14. require __DIR__.'/bootstrap/autoload.php';
  15. /*
  16. |--------------------------------------------------------------------------
  17. | Turn On The Lights
  18. |--------------------------------------------------------------------------
  19. |
  20. | We need to illuminate PHP development, so let's turn on the lights.
  21. | This bootstrap the framework and gets it ready for use, then it
  22. | will load up this application so that we can run it and send
  23. | the responses back to the browser and delight these users.
  24. |
  25. */
  26. $app = require_once __DIR__.'/bootstrap/start.php';
  27. $app->boot();
  28. /*
  29. |--------------------------------------------------------------------------
  30. | Load The Artisan Console Application
  31. |--------------------------------------------------------------------------
  32. |
  33. | We'll need to run the script to load and return the Artisan console
  34. | application. We keep this in its own script so that we will load
  35. | the console application independent of running commands which
  36. | will allow us to fire commands from Routes when we want to.
  37. |
  38. */
  39. $artisan = Illuminate\Console\Application::start($app);
  40. /*
  41. |--------------------------------------------------------------------------
  42. | Run The Artisan Application
  43. |--------------------------------------------------------------------------
  44. |
  45. | When we run the console application, the current CLI command will be
  46. | executed in this console and the response sent back to a terminal
  47. | or another output device for the developers. Here goes nothing!
  48. |
  49. */
  50. $status = $artisan->run();
  51. /*
  52. |--------------------------------------------------------------------------
  53. | Shutdown The Application
  54. |--------------------------------------------------------------------------
  55. |
  56. | Once Artisan has finished running. We will fire off the shutdown events
  57. | so that any final work may be done by the application before we shut
  58. | down the process. This is the last thing to happen to the request.
  59. |
  60. */
  61. $app->shutdown();
  62. exit($status);