mkA~(@^_^@)~PNG  IHDR Ÿ f Õ†C1 sRGB ®Îé gAMA ± üa pHYs à ÃÇo¨d GIDATx^íÜL”÷ð÷Yçªö("Bh_ò«®¸¢§q5kÖ*:þ0A­ºšÖ¥]VkJ¢M»¶f¸±8\k2íll£1]q®ÙÔ‚ÆT p0 id = $id; $this->translation_model = new $model(); $this->foreign_key = $foreign_key; } public function validate(string $attribute, mixed $value, Closure $fail): void { [$locale, $attr] = explode('.', $attribute, 2); $exists = $this->translation_model::where($attr, $value) ->where('locale', $locale) ->when($this->id, function ($query, $id) { $query->where($this->foreign_key, '!=', $id); })->exists(); if ($exists) { $fail(__('validation.unique')); } } }