Hi @TF120
So firstly can I just check some basics. In laravel you would normally pass in your request object as a param (and state the visibility of your method) e.g.
public function addAppointment(Request $request)
{
..
// $search = request('searchdob'); then this line should be
$search = $request->input('searchdob');
..
}
Second what is the field type for dateofbirth? You'll need to validate your date input to match the field type. Assuming it's datetime (0000-00-00 00:00:00) then your current placeholder format (dd/mm/yyyy) wont match I don't think .
You should convert them both to datetime or Carbon then you can make use of ->whereDate which is built into Eloquent
->whereDate('dataofbirth', '=', $search);