all() public méthode

Get all tags
public all ( ) : mixed
Résultat mixed
Exemple #1
0
 /**
  * Display a listing of the resource based on a tag.
  *
  * @param $slug
  *
  * @return \Illuminate\View\View
  */
 public function tag($slug)
 {
     $tag = $this->tags->findByField('slug', $slug)->first();
     $posts = $tag->posts()->with(['author', 'tags'])->paginate(5);
     $tags = $this->tags->all();
     return view('frontend.pages.blog.tag', compact('tag', 'posts', 'tags'));
 }
Exemple #2
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\View\View
  */
 public function index()
 {
     $tags = $this->tags->all();
     return view('backend.tags.index', compact('tags'));
 }
Exemple #3
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\View\View
  */
 public function index()
 {
     $works = $this->works->with('tags')->all();
     $tags = $this->tags->all();
     return view('frontend.pages.works.index', compact('works', 'tags'));
 }
 /**
  * Get all Tags used to group posts.
  *
  * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
  */
 public function groupByTag()
 {
     $tags = $this->tag->all();
     return view('front.archive.tag', compact('tags'));
 }
Exemple #5
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\View\View
  */
 public function indexRaw()
 {
     $tags = $this->tags->all()->pluck('name');
     return $tags;
 }