/** * @return \Illuminate\Routing\Route|null|string */ public function ingnoreId() { $id = $this->route('control'); $item_id = $this->input('item_id'); $test_category_id = $this->input('test_category_id'); $quantity_ordered = $this->input('quantity_ordered'); return Topup::where(compact('id', 'item_id', 'test_category_id', 'quantity_ordered'))->exists() ? $id : ''; }