Livewire

Livewire

Livewire is widespread and popular in the Laravel world. Anyone who wants to provide custom packages with Livewire knows how time-consuming this can be.

Bootraiser integrates your Livewire components easily, without any fiddling!

random-package-location

todo livewire publish uses the view or component publisher

Livewire in packages

General things that are important for the use of Livewire in packages:

<livewire:your-package::livewire-demo/>

  1. start with livewire
  2. : colon
  3. your-package (package-name)
  4. :: double colon
  5. livewire-demo livewire view class

load livewire

<?php
namespace YourCompany\YourPackage\Providers;

use Filefabrik\Bootraiser\Raiser;
use Illuminate\Support\ServiceProvider;

class YourPackageServiceProvider extends ServiceProvider
{
    public function boot(): void
    {
        Raiser::forProvider($this)->loadLivewire();
    }
}

publishing livewire views

ℹ️
Livewire views, like other package views, are published with the command php artisan vendor:publish
Last updated on