Skip to content

Commit

Permalink
load View and Components
Browse files Browse the repository at this point in the history
  • Loading branch information
salahhusa9 committed Aug 31, 2023
1 parent eeafea4 commit bf44ec0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/LaravelTemplateComponentsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,19 @@ public function configurePackage(Package $package): void
$package
->name('laravel-template-components')
->hasConfigFile()
->hasViews()
->hasInstallCommand(function (InstallCommand $command) {
$command
->publishConfigFile()
->askToStarRepoOnGitHub('salahhusa9/laravel-template-components');
});

$this->loadViewsFrom(__DIR__.'/../resources/views/components', 'template-components');
$this->loadViewComponentsAs('template-components', [
'card' => 'template-components::components.card',
'button' => 'template-components::components.button',
'input' => 'template-components::components.input',
'select' => 'template-components::components.select',
'textarea' => 'template-components::components.textarea',
]);
}
}

0 comments on commit bf44ec0

Please sign in to comment.