artisan 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. $app = require_once __DIR__.'/bootstrap/app.php';
  16. /*
  17. |--------------------------------------------------------------------------
  18. | Run The Artisan Application
  19. |--------------------------------------------------------------------------
  20. |
  21. | When we run the console application, the current CLI command will be
  22. | executed in this console and the response sent back to a terminal
  23. | or another output device for the developers. Here goes nothing!
  24. |
  25. */
  26. $kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
  27. $status = $kernel->handle(
  28. $input = new Symfony\Component\Console\Input\ArgvInput,
  29. new Symfony\Component\Console\Output\ConsoleOutput
  30. );
  31. /*
  32. |--------------------------------------------------------------------------
  33. | Shutdown The Application
  34. |--------------------------------------------------------------------------
  35. |
  36. | Once Artisan has finished running, we will fire off the shutdown events
  37. | so that any final work may be done by the application before we shut
  38. | down the process. This is the last thing to happen to the request.
  39. |
  40. */
  41. $kernel->terminate($input, $status);
  42. exit($status);