parfum/app/Livewire/Studio/Catalog/Bottle/Index.php
Yoga Pangestu 4c43729299 feat(bottle): crud botol
-menambahkan skema model dan migrsai
-menyesuaikan relasi
2025-10-02 09:34:56 +07:00

38 lines
717 B
PHP

<?php
namespace App\Livewire\Studio\Catalog\Bottle;
use App\Models\Bottle;
use App\Traits\WithConfirmation;
use Flux\Flux;
use Livewire\Attributes\Title;
use Livewire\Component;
#[Title('Botol')]
class Index extends Component
{
use WithConfirmation;
public function delete(Bottle $bottle)
{
$bottle->delete();
$this->dispatch('refreshDatatable');
Flux::toast(
heading: 'Berhasil',
text: 'Botol berhasil dihapus.',
variant: 'success',
);
Flux::modals()->close();
}
public function render()
{
return view('livewire.studio.catalog.bottle.index', [
'pageTitle' => 'Botol',
]);
}
}