|string> */ public function rules(): array { Session::put('supplier_update',true); return [ 'supplier_ref'=> [ 'required', 'string', 'min:2', Rule::unique('account_supplier') ->where(fn($query)=>$query ->where('account_id',request()->get('account_id'))) ->where('supplier_id',request()->get('supplier_id')), ], 'supplier_id'=>'required|exists:suppliers,id', ]; } }