I'm trying to get a student record when the user enters only part of the student's name. In other words, check if one of the current students names contains the string entered by the user, and if so, return that record.
My current code, which return the record only after the user has entered the full name:
public function getStudent($name) {
$std = Student::where('first_name', $name)->get();
return $std;
}
Thanks