Naming Livewire Components
If you put your livewire component in a sub folder then its name will be lowercase foldername followed by a period; eg
Livewire model of App\Http\Livewire\Modals\Notifications.php
1
@livewire('modals.notifications')
2
3
onclick="Livewire.emit('openModal', 'modals.notifications')" />
Copied!
If your Component Class is Pascal Case, eg DatabaseNotifications then the class name called from the frontend will be lowercase and with a hyphen before any uppercase, eg
1
@livewire('modals.database-notifications')
2
3
onclick="Livewire.emit('openModal', 'modals.database-notifications')" />
Copied!
Last modified 30d ago
Copy link