Reputation: 19
Despite some research, I could not find any reference to how to customise Jetstream components such as 'welcome'. Maybe someone has a hint how to do this? Thanks!
Upvotes: 2
Views: 7144
Reputation: 1172
If you want to create a custom Laravel Jetstream Blade component for example my-component
or override a predefined one, there are steps:
resources/views/components/my-component.blade.php
boot()
method of JetstreamServiceProvider
class at app/Providers/JetstreamServiceProvider.php
and add the code:
public function boot()
{
//existing code....
$this->callAfterResolving(BladeCompiler::class, function () {
Blade::component('components.my-component', 'jet-my-component');
});
}
Upvotes: 1
Reputation: 140
it easy to customize use
php artisan vendor:publish --tag=jetstream-views
to publish Components
go to resources/views/welcome.blade.php
edit and modify the blade file to suit your customization
Upvotes: 2
Reputation: 59
Try this:
php artisan vendor:publish --tag=jetstream-views
After that files will be available under the folder resources/views/vendor/jetstream/components
In this directory you will be able to find this welcome.blade.php
Upvotes: 6