artisan 2.1 KB

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