Skip to content

Commit

Permalink
Use viewcomposer to push to the head instead
Browse files Browse the repository at this point in the history
  • Loading branch information
indykoning committed Jan 29, 2025
1 parent b7bc9c0 commit a7f654e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/DemoHelperServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ public function bootViews(): self
{
$this->loadViewsFrom(__DIR__.'/../resources/views', 'rapidez-demo-helper');

if (! $this->app->runningInConsole()) {
View::startPush('head', view('rapidez-demo-helper::top-bar'));
}
View::composer('rapidez::layouts.app', fn($view) => $view->getFactory()->startPush('head', view('rapidez-demo-helper::top-bar')));

return $this;
}
Expand Down

0 comments on commit a7f654e

Please sign in to comment.