artisan 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #!/usr/bin/env php
  2. <?php
  3. use Illuminate\Console\Application as Artisan;
  4. define('LARAVEL_START', microtime(true));
  5. /*
  6. |--------------------------------------------------------------------------
  7. | Register The Auto Loader
  8. |--------------------------------------------------------------------------
  9. |
  10. | Composer provides a convenient, automatically generated class loader
  11. | for our application. We just need to utilize it! We'll require it
  12. | into the script here so that we do not have to worry about the
  13. | loading of any our classes "manually". Feels great to relax.
  14. |
  15. */
  16. require __DIR__.'/vendor/autoload.php';
  17. $app = require_once __DIR__.'/bootstrap/app.php';
  18. /*
  19. |--------------------------------------------------------------------------
  20. | Run The Artisan Application
  21. |--------------------------------------------------------------------------
  22. |
  23. | When we run the console application, the current CLI command will be
  24. | executed in this console and the response sent back to a terminal
  25. | or another output device for the developers. Here goes nothing!
  26. |
  27. */
  28. Artisan::starting(function ($artisan) {
  29. $artisan->resolveCommands([
  30. App\ComposerConfigCommand::class,
  31. ]);
  32. });
  33. $kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
  34. $status = $kernel->handle(
  35. $input = new Symfony\Component\Console\Input\ArgvInput,
  36. new Symfony\Component\Console\Output\ConsoleOutput
  37. );
  38. /*
  39. |--------------------------------------------------------------------------
  40. | Shutdown The Application
  41. |--------------------------------------------------------------------------
  42. |
  43. | Once Artisan has finished running, we will fire off the shutdown events
  44. | so that any final work may be done by the application before we shut
  45. | down the process. This is the last thing to happen to the request.
  46. |
  47. */
  48. $kernel->terminate($input, $status);
  49. exit($status);