Laravel 8.15.0/Jetstream – How to register new blades x-jet-newblade?

  jetstream, laravel, laravel-8, laravel-blade, php

I’am just doing my very first steps with Laravel 8 and found a problem that I can not solve.

/var/www/html/laravel/resources/views/dashboard.blade.php:

    <div class="py-12">
    <div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
        <div class="bg-white overflow-hidden shadow-xl sm:rounded-lg">
            <x-jet-welcome />
        </div>

If i create a new blade in the same directory (f.e. the form.blade.php) with the same code as above but with <x-jet-subform/> instead of <x-jet-welcome> it should normally redirect to the subform.blade.php which is located under var/www/html/laravel/resources/views/vendor/jetstream/components/subform.blade.php

But if I try to get to that page (after setting a Route at web.php) it says

InvalidArgumentException
Unable to locate a class or view for component [jet-subform].

So I think it’s neccessary to "register" new blades but i found no ways how to do that?

The view is allready published with

php artisan vendor:publish --tag=jetstream-views

Source: Laravel

Leave a Reply