2

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!

Peter Wyss
  • 19
  • 1
  • 3

3 Answers3

6

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

1

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

Pathros
  • 10,042
  • 20
  • 90
  • 156
bazzlycodes
  • 90
  • 1
  • 3
0

If you want to create a custom Laravel Jetstream Blade component for example my-component or override a predefined one, there are steps:

  1. Create a Blade HTML template at, for example, resources/views/components/my-component.blade.php
  2. Edit the 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');
    });
}
Igor
  • 755
  • 1
  • 10
  • 22