autoload.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. define('LARAVEL_START', microtime(true));
  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. | Include The Compiled Class File
  18. |--------------------------------------------------------------------------
  19. |
  20. | To dramatically increase your application's performance, you may use a
  21. | compiled class file which contains all of the classes commonly used
  22. | by a request. The Artisan "optimize" is used to create this file.
  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. }