artisan 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #!/usr/bin/env php
  2. <?php
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Register The Composer 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__.'/vendor/autoload.php';
  15. /*
  16. |--------------------------------------------------------------------------
  17. | Register The Workbench Loaders
  18. |--------------------------------------------------------------------------
  19. |
  20. | The Laravel workbench provides a convenient place to develop packages
  21. | when working locally. However we will need to load in the Composer
  22. | auto-load files for the packages so that these can be used here.
  23. |
  24. */
  25. if (is_dir($workbench = __DIR__.'/workbench'))
  26. {
  27. Illuminate\Workbench\Starter::start($workbench);
  28. }
  29. /*
  30. |--------------------------------------------------------------------------
  31. | Turn On The Lights
  32. |--------------------------------------------------------------------------
  33. |
  34. | We need to illuminate PHP development, so let's turn on the lights.
  35. | This bootstrap the framework and gets it ready for use, then it
  36. | will load up this application so that we can run it and send
  37. | the responses back to the browser and delight these users.
  38. |
  39. */
  40. $app = require_once __DIR__.'/start.php';
  41. /*
  42. |--------------------------------------------------------------------------
  43. | Load The Artisan Console Application
  44. |--------------------------------------------------------------------------
  45. |
  46. | We'll need to run the script to load and return the Artisan console
  47. | application. We keep this in its own script so that we will load
  48. | the console application independent of running commands which
  49. | will allow us to fire commands from Routes when we want to.
  50. |
  51. */
  52. $artisan = Illuminate\Console\Application::start($app);
  53. /*
  54. |--------------------------------------------------------------------------
  55. | Run The Artisan Application
  56. |--------------------------------------------------------------------------
  57. |
  58. | When we run the console application, the current CLI command will be
  59. | executed in this console and the response sent back to a terminal
  60. | or another output device for the developers. Here goes nothing!
  61. |
  62. */
  63. $artisan->run();