Skip to content

Commit

Permalink
Ability to not load external dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
billmn committed Apr 7, 2022
1 parent 68cb441 commit 0e15b0f
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/DashboardServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,17 @@ class DashboardServiceProvider extends ServiceProvider
{
public function boot()
{
$this->app->make(Dashboard::class)
->script(config('dashboard.scripts.alpinejs'))
->stylesheet(config('dashboard.stylesheets.inter'))
->inlineStylesheet(file_get_contents(__DIR__.'/../resources/dist/dashboard.min.css'));
$dashboard = $this->app->make(Dashboard::class);

if ($alpine = config('dashboard.scripts.alpinejs')) {
$dashboard->script($alpine);
}

if ($inter = config('dashboard.stylesheets.inter')) {
$dashboard->stylesheet($inter);
}

$dashboard->inlineStylesheet(file_get_contents(__DIR__.'/../resources/dist/dashboard.min.css'));

$this->loadViewsFrom(__DIR__ . '/../resources/views', 'dashboard');

Expand Down

0 comments on commit 0e15b0f

Please sign in to comment.