Load extensions from the root directory, with precedence.

This commit is contained in:
Toby Zerner 2015-06-08 14:56:49 +09:30
parent a41d02f030
commit e7f2e62cec

View File

@ -22,11 +22,12 @@ class ExtensionsServiceProvider extends ServiceProvider
$providers = []; $providers = [];
foreach ($extensions as $extension) { foreach ($extensions as $extension) {
if (file_exists($file = base_path().'/extensions/'.$extension.'/bootstrap.php')) { if (file_exists($file = public_path().'/extensions/'.$extension.'/bootstrap.php') ||
file_exists($file = base_path().'/extensions/'.$extension.'/bootstrap.php')) {
$providers[$extension] = require $file; $providers[$extension] = require $file;
} }
} }
// @todo store $providers somewhere so that extensions can talk to each other // @todo store $providers somewhere (in Core?) so that extensions can talk to each other
} }
} }