Skip to content

Instantly share code, notes, and snippets.

@jesseobrien
Last active December 19, 2015 00:49
Show Gist options
  • Select an option

  • Save jesseobrien/5870964 to your computer and use it in GitHub Desktop.

Select an option

Save jesseobrien/5870964 to your computer and use it in GitHub Desktop.
Loading up a directory of composer files.
<?php
/**
* LARAVEL 3: Put this in app/start.php at the bottom
*/
/**
* Register any composers in the composers directory
*/
foreach(glob('application/composers/*.php') as $file)
{
require_once($file);
}
<?php
/**
* LARAVEL 4: Put this in app/start/global.php at the bottom
*/
/**
* Register any composers in the composers directory
*/
foreach(glob('app/composers/*.php') as $file)
{
require_once($file);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment