Skip to content

Commit

Permalink
Update ServiceProvider@registerBladeDirective
Browse files Browse the repository at this point in the history
Enable to give a different id for parent div
  • Loading branch information
halilcakar authored Sep 8, 2020
1 parent 3e2a01f commit 1806bf9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public function boot()

protected function registerBladeDirective()
{
Blade::directive('inertia', function () {
return '<div id="app" data-page="{{ json_encode($page) }}"></div>';
Blade::directive('inertia', function ($id = 'app') {
return '<div id="'. $id .'" data-page="{{ json_encode($page) }}"></div>';
});
}

Expand Down

0 comments on commit 1806bf9

Please sign in to comment.