Skip to content

Instantly share code, notes, and snippets.

@ayonliu
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ayonliu/9ed1b4bbdbb6f9ac5a67 to your computer and use it in GitHub Desktop.
Save ayonliu/9ed1b4bbdbb6f9ac5a67 to your computer and use it in GitHub Desktop.
Register The Laravel Class Loader without Composer updating.
<?php
/*
| path: app/start/global.php
|--------------------------------------------------------------------------
| Register The Laravel Class Loader
|--------------------------------------------------------------------------
|
| In addition to using Composer, you may use the Laravel class loader to
| load your controllers and models. This is useful for keeping all of
| your classes in the "global" namespace without Composer updating.
|
*/
ClassLoader::addDirectories(array(
app_path().'/commands',
app_path().'/controllers',
app_path().'/models',
app_path().'/database/seeds',
// add my own library
app_path().'/library',
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment