public function index(Request $request)
{
$colors = Color::with(['collection' => function($query){
$query->with('manufacturer');
}])->get();
if ($request->has('manufacturer')) {
# code...
}
if ($request->has('collection')) {
# code...
}
return view('colors.index', compact('colors'));
}