here my code : 

```
$prestations = Prestation::with(
            [
            'service' => function($service) use($searchService) {
                $service->select(['id','name'])->where('name', 'regexp', "/$searchService/i");
            },
            'facility' => function($facility) use($searchPartenaire) {
                $facility->select(['id','name'])->where('name', 'regexp', "/$searchPartenaire/i");
            }
            ]
        )
            ->where('name', 'regexp', "/$search/i")
            ->orderBy($orderBy, $orderDirection)
            ->simplePaginate(50);

        $res = [
            'results' => $prestations,
            'total' => Prestation::all()->count(),
        ];

```

The problem is that in the output of all datas where "service" and "facility" names are not equal on the $searchService and $searchPartenaire the values are replaced by "null".
So i don't want to have values in the output where the search variables are not equals.

Thank you.