artisan 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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 bootstraps the framework and gets it ready for and 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/app.php';
  27. /*
  28. |--------------------------------------------------------------------------
  29. | Run The Artisan Application
  30. |--------------------------------------------------------------------------
  31. |
  32. | When we run the console application, the current CLI command will be
  33. | executed in this console and the response sent back to a terminal
  34. | or another output device for the developers. Here goes nothing!
  35. |
  36. */
  37. $status = $app->make('Illuminate\Contracts\Console\Kernel')->handle(
  38. new Symfony\Component\Console\Input\ArgvInput,
  39. new Symfony\Component\Console\Output\ConsoleOutput
  40. );
  41. /*
  42. |--------------------------------------------------------------------------
  43. | Shutdown The Application
  44. |--------------------------------------------------------------------------
  45. |
  46. | Once Artisan has finished running. We will fire off the shutdown events
  47. | so that any final work may be done by the application before we shut
  48. | down the process. This is the last thing to happen to the request.
  49. |
  50. */
  51. exit($status);