parfum/app/Livewire/Studio/Catalog/Bottle/Index.php

37 lines
788 B
PHP

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