autoload.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. | Include The Compiled Class File
  17. |--------------------------------------------------------------------------
  18. |
  19. | To dramatically increase your application's performance, you may use a
  20. | compiled class file which contains all of the classes commonly used
  21. | by a request. The Artisan "optimize" is used to create this file.
  22. |
  23. */
  24. if (file_exists($compiled = __DIR__.'/compiled.php'))
  25. {
  26. require $compiled;
  27. }
  28. /*
  29. |--------------------------------------------------------------------------
  30. | Register The Laravel Auto Loader
  31. |--------------------------------------------------------------------------
  32. |
  33. | We register an auto-loader "behind" the Composer loader that can load
  34. | model classes on the fly, even if the autoload files have not been
  35. | regenerated for the application. We'll add it to the stack here.
  36. |
  37. */
  38. Illuminate\Support\ClassLoader::register();
  39. /*
  40. |--------------------------------------------------------------------------
  41. | Register The Workbench Loaders
  42. |--------------------------------------------------------------------------
  43. |
  44. | The Laravel workbench provides a convenient place to develop packages
  45. | when working locally. However we will need to load in the Composer
  46. | auto-load files for the packages so that these can be used here.
  47. |
  48. */
  49. if (is_dir($workbench = __DIR__.'/../workbench'))
  50. {
  51. Illuminate\Workbench\Starter::start($workbench);
  52. }