Skip to content

Commit

Permalink
Move directive initialisation to the boot method (#24)
Browse files Browse the repository at this point in the history
Fixes #23
  • Loading branch information
owenvoke authored and Elhebert committed Mar 6, 2019
1 parent 541376f commit f2c9ee7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/SriServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ public function register()
__DIR__.'/../config/subresource-integrity.php',
'subresource-integrity'
);
}

public function boot()
{
$this->publishes([
__DIR__.'/../config/subresource-integrity.php' => config_path('subresource-integrity.php'),
]);

Blade::directive('mixSri', function (string $path, bool $crossOrigin = false) {
if (starts_with($path, ['http', 'https', '//'])) {
Expand Down Expand Up @@ -56,11 +63,4 @@ public function register()
}
});
}

public function boot()
{
$this->publishes([
__DIR__.'/../config/subresource-integrity.php' => config_path('subresource-integrity.php'),
]);
}
}

0 comments on commit f2c9ee7

Please sign in to comment.