Skip to content

Commit f3c6105

Browse files
authored
Merge pull request #5244 from Laravel-Backpack/load-directives-after-resolving
Load directives after resolving
2 parents d04677d + 5ff9e93 commit f3c6105

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/BackpackServiceProvider.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use Illuminate\Support\Facades\Blade;
1414
use Illuminate\Support\ServiceProvider;
1515
use Illuminate\Support\Str;
16+
use Illuminate\View\Compilers\BladeCompiler;
1617

1718
class BackpackServiceProvider extends ServiceProvider
1819
{
@@ -302,7 +303,9 @@ public function loadConfigs()
302303

303304
public function loadViewComponents()
304305
{
305-
Blade::componentNamespace('Backpack\\CRUD\\app\\View\\Components', 'backpack');
306+
$this->app->afterResolving(BladeCompiler::class, function () {
307+
Blade::componentNamespace('Backpack\\CRUD\\app\\View\\Components', 'backpack');
308+
});
306309
}
307310

308311
/**

0 commit comments

Comments
 (0)