autoload.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. /*
  3. |--------------------------------------------------------------------------
  4. | Register The Composer Auto Loader
  5. |--------------------------------------------------------------------------
  6. |
  7. | Composer provides a convenient, automatically generated class loader
  8. | for our application. We just need to utilize it! We'll require it
  9. | into the script here so that we do not have to worry about the
  10. | loading of any our classes "manually". Feels great to relax.
  11. |
  12. */
  13. require __DIR__.'/../vendor/autoload.php';
  14. /*
  15. |--------------------------------------------------------------------------
  16. | Register The Composer Auto Loader
  17. |--------------------------------------------------------------------------
  18. |
  19. | Composer provides a convenient, automatically generated class loader
  20. | for our application. We just need to utilize it! We'll require it
  21. | into the script here so that we do not have to worry about the
  22. | loading of any our classes "manually". Feels great to relax.
  23. |
  24. */
  25. if (file_exists($compiled = __DIR__.'/compiled.php'))
  26. {
  27. require $compiled;
  28. }
  29. /*
  30. |--------------------------------------------------------------------------
  31. | Register The Laravel Auto Loader
  32. |--------------------------------------------------------------------------
  33. |
  34. | We register an auto-loader "behind" the Composer loader that can load
  35. | model classes on the fly, even if the autoload files have not been
  36. | regenerated for the application. We'll add it to the stack here.
  37. |
  38. */
  39. Illuminate\Support\ClassLoader::register();
  40. /*
  41. |--------------------------------------------------------------------------
  42. | Register The Workbench Loaders
  43. |--------------------------------------------------------------------------
  44. |
  45. | The Laravel workbench provides a convenient place to develop packages
  46. | when working locally. However we will need to load in the Composer
  47. | auto-load files for the packages so that these can be used here.
  48. |
  49. */
  50. if (is_dir($workbench = __DIR__.'/../workbench'))
  51. {
  52. Illuminate\Workbench\Starter::start($workbench);
  53. }