$model->with(['my-relation' => function($query) {
$query->where('shop_visible', '=', true);
}]);
bweston92 said:
$model->with(['my-relation' => function($query) { $query->where('shop_visible', '=', true); }]);
Thank a lot! It works :)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community