all() public method

Get all tags
public all ( ) : mixed
return mixed
コード例 #1
0
ファイル: BlogController.php プロジェクト: tyloo/tyloo
 /**
  * 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'));
 }
コード例 #2
0
ファイル: TagsController.php プロジェクト: pet1330/tyloo
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\View\View
  */
 public function index()
 {
     $tags = $this->tags->all();
     return view('backend.tags.index', compact('tags'));
 }
コード例 #3
0
ファイル: WorkController.php プロジェクト: pet1330/tyloo
 /**
  * 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'));
 }
コード例 #4
0
 /**
  * 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'));
 }
コード例 #5
0
ファイル: TagsController.php プロジェクト: tyloo/tyloo
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\View\View
  */
 public function indexRaw()
 {
     $tags = $this->tags->all()->pluck('name');
     return $tags;
 }