public function destroy($id) { $promotion = Promotion::with('reductions')->find($id); if ($promotion->reductions->count() > 0) { Session::flash('message', 'Tidak dapat menghapus promo! Promo ini pernah digunakan!'); } else { Promotion::destroy($id); Session::flash('message', 'Sukses menghapus promo'); } }