public function index() { $attrs = Attribute::orderBy("id", "asc"); if (!empty(Input::get("attr_name"))) { $attrs = $attrs->where("attr", "like", "%" . Input::get("attr_name") . "%"); } $attrs = $attrs->paginate(Config('constants.paginateNo')); return view(Config('constants.adminAttrView') . '.index', compact('attrs')); }