Channel::where('is_visible', true)->get(), ]); } /** * Display the specified resource. * * @param int $id * @return Response */ public function show(Request $request, $entrepreneur) { $channel = Channel::where('slug', $entrepreneur)->where('is_visible', true)->firstOrFail(); $products = ProductRepository::make($request) ->queryAsFromResource($channel) ->applyBasicQueries() ->applyFilters() ->applySorting() ->simplePaginate(); return $request->ajax() ? ProductRepository::ajaxPaginate($products) : view('web.themes.shella.pages.entrepreneurs.home.products', [ 'resource' => $channel, 'products' => $products, ]); } }