artisan 1.8 KB

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