Skip to content

Commit

Permalink
Merge pull request #139 from halilcakar/patch-1
Browse files Browse the repository at this point in the history
Update ServiceProvider@registerBladeDirective
  • Loading branch information
reinink authored Sep 9, 2020
2 parents 3e2a01f + 1806bf9 commit b3de401
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 b3de401

Please sign in to comment.