Hello I have a little problem with eloquent in Laravel 5.
I have this function:
$lists = Model::with(array('relation_with_registered_in_model'=>function($query){
$query->where("name","cccc");
}))->get();
My poblem is that return always all results, ignoring where clause.
I tried to print my query (generated with function) and if I execute the query in my phpmyadmin it return correct filtered results.
What I'm wrong?