mirror of
https://github.com/flarum/framework.git
synced 2024-12-12 06:03:39 +08:00
Load extensions from the root directory, with precedence.
This commit is contained in:
parent
a41d02f030
commit
e7f2e62cec
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user