Open
Description
$query = $this->proposal->where('status', 'approved')
->with(['evaluations', 'user', 'contributions'])
->with(['reviews' => function ($q) {
$q->where('status','approved')->orderBy('created_at', 'desc');
}]);
...
dd($query->toSql()); // "select * from "proposals" where "status" = ?"
$proposalsFoundByTile = $query->where('title','like',"%$request->search%")->get();
dd($query->toSql()); // "select from "proposals" where "status" = ? and "title" like ?"
...
Why $query value changed? How can I "clear" this changes to initial value?