mirror of
https://github.com/flarum/framework.git
synced 2025-02-23 16:40:54 +08:00
Load extensions from the root directory, with precedence.
This commit is contained in:
parent
b864ada389
commit
36257b1534
@ -22,11 +22,12 @@ class ExtensionsServiceProvider extends ServiceProvider
|
||||
$providers = [];
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
// @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…
x
Reference in New Issue
Block a user