refactor(MoneyServiceProvider, ViewServiceProvider): streamline boot methods
Removed unnecessary conditionals and improved method calls for clarity.
This commit is contained in:
parent
e857a58d00
commit
da0c3afc14
2 changed files with 3 additions and 4 deletions
|
|
@ -66,9 +66,7 @@ class MoneyServiceProvider extends ServiceProvider
|
|||
*/
|
||||
public function boot()
|
||||
{
|
||||
if (! $this->app->runningInConsole()) {
|
||||
$this->sharetoView();
|
||||
}
|
||||
$this->sharetoView();
|
||||
}
|
||||
|
||||
private function sharetoView(): void
|
||||
|
|
|
|||
|
|
@ -22,12 +22,13 @@ class ViewServiceProvider extends ServiceProvider
|
|||
*/
|
||||
public function boot(EloquentProductRepository $productRepository)
|
||||
{
|
||||
$this->setUpBladeMacros($productRepository);
|
||||
|
||||
if ($this->app->runningInConsole() && ! $this->app->runningUnitTests()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->setupPaginator();
|
||||
$this->setUpBladeMacros($productRepository);
|
||||
}
|
||||
|
||||
private function setupPaginator(): void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue