Fix Livewire routes and upgrade SFC component to Laravel 4

This commit is contained in:
HolgerHatGarKeineNode
2026-01-18 00:09:26 +01:00
parent a73587b9e8
commit f73ba2ea15
2 changed files with 10 additions and 9 deletions

View File

@@ -1,15 +1,16 @@
<?php
use function Livewire\Volt\state;
use function Livewire\Volt\mount;
use Livewire\Component;
state(['currentRoute' => '']);
mount(function() {
$currentLivewireRouteName = request()->route()->getName();
$this->currentRoute = $currentLivewireRouteName;
});
new class extends Component {
public $currentRoute = '';
public function mount(): void
{
$currentLivewireRouteName = request()->route()->getName();
$this->currentRoute = $currentLivewireRouteName;
}
};
?>
<div class="min-w-fit">