Building a filer

I am converting some finds from cakephp2 to cakephp3.
I am building a search filter and seem to have created it. Is this how it is done or is there a more efficient way? It returns all the rows required.

$query3 = $this->Lessons->find()
->contain([‘Tutors’,‘Subjects’, ‘TutoringTypes’,‘Terms’,‘Students’])

           ->where(['Lessons.lesson_date >' => $a3,'Lessons.lesson_date <' => $a4,
              'tutors.first_name like' => '%'.$a5.'%','tutors.last_name like' => '%'.$a6.'%',
                   ' like' => '%'.$a7.'%',
             'OR' => [['lessons.tutoring_type_id' => 2], ['lessons.tutoring_type_id' => 1]]
        $query3->matching('Students', function ($q) use ($a8) {
             return $q
              ->where(['Students.first_name like' =>'%'.$a8.'%']);