/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index($productId) { return Description::ofProduct($productId)->paginate(); }
public function index($productId, Request $request) { return Description::ofProduct($productId)->withKeyword($request->input('keyword'))->paginate(15); }