Frequently Used Methods
Frequently Used Methods
Frequently Used Methods
Frequently Used Methods
public function destroy($id) { $discount = Discount::with('reductions')->find($id); if ($discount->reductions->count() > 0) { Session::flash('message', 'Tidak dapat menghapus data Diskon! Diskon ini pernah digunakan'); } else { Discount::destroy($id); Session::flash('message', 'Sukses menghapus Diskon!'); } }