/** * Display a listing of the resource. * * @return Response */ public function index() { $tags = Tag::latest()->get(); return view('tag.index', compact('tags')); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $tags = Tag::latest()->paginate(20); return view('tags.index', compact('tags')); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $num_per_page = env('num_per_page_admin'); $tags = Tag::latest()->paginate($num_per_page); return view('admin.tags.index', compact('tags')); }
private function searchByTags($searchTerms) { foreach ($searchTerms as $term) { $query = Tag::latest()->where('name', 'LIKE', '%' . $term . '%'); } return $query->get(); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { return view('tags.grid', ['tags' => TagModel::latest('id')->get()]); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $models = Tag::latest()->paginate(10); return view('admin.tag.index', compact('models')); }
public function adminTags(EditTag $request) { $tags = \App\Tag::latest()->get(); return view('admin.tags', compact('tags')); }