Skip to content

Commit 1806bf9

Browse files
authored
Update ServiceProvider@registerBladeDirective
Enable to give a different id for parent div
1 parent 3e2a01f commit 1806bf9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ public function boot()
2828

2929
protected function registerBladeDirective()
3030
{
31-
Blade::directive('inertia', function () {
32-
return '<div id="app" data-page="{{ json_encode($page) }}"></div>';
31+
Blade::directive('inertia', function ($id = 'app') {
32+
return '<div id="'. $id .'" data-page="{{ json_encode($page) }}"></div>';
3333
});
3434
}
3535

0 commit comments

Comments
 (0)