Skip to content

Commit

Permalink
🐛 Fix load hook actions
Browse files Browse the repository at this point in the history
  • Loading branch information
juzaweb committed Jun 20, 2021
1 parent 97db177 commit 2b25368
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v1.1.6
- Fix add folder file manager
- Fix theme namespace

## v1.1.5
- Retruck cms
- Fix more bug
Expand Down
20 changes: 11 additions & 9 deletions src/Core/Providers/HookActionServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,19 @@ class HookActionServiceProvider extends ServiceProvider
{
public function boot()
{
$paths = apply_filters('mymo.actions', []);
$this->app->booted(function () {
$paths = apply_filters('mymo.actions', []);

foreach ($paths as $path) {
if (!is_dir($path)) {
continue;
}
foreach ($paths as $path) {
if (!is_dir($path)) {
continue;
}

$files = File::allFiles($path);
foreach ($files as $file) {
require ($file->getRealPath());
$files = File::allFiles($path);
foreach ($files as $file) {
require ($file->getRealPath());
}
}
}
});
}
}

0 comments on commit 2b25368

Please sign in to comment.