parfum/app/Traits/Voucher/WithOutletSelector.php
Yoga Pangestu ef05482000 feat(voucher): mengaitkan voucher dengan outlet dengan relasi many to many
-membuat tabel pivot
-menyesuaikan seeder
-menyesuaikan logika yang berkaitan dengan perubahan tersebut
2025-09-30 10:00:54 +07:00

17 lines
258 B
PHP

<?php
namespace App\Traits\Voucher;
trait WithOutletSelector
{
public function selectAll()
{
$this->form->outlet_ids = array_keys($this->outlets);
}
public function deselectAll()
{
$this->form->outlet_ids = [];
}
}