first_name = $firstName; $this->last_name = $lastName; $this->school_id = $schoolID; } public function passes($attributies, $value) { return Student::where('first_name', $this->first_name) ->where('last_name', $this->last_name) ->where('school_id', $this->school_id) ->exists(); } public function message() { return "There is already a student with that name at the school you are trying to add them to"; } /** * Run the validation rule. * * @param \Closure(string): \Illuminate\Translation\PotentiallyTranslatedString $fail */ public function validate(string $attribute, mixed $value, Closure $fail): void { // } }