App\Repositories\TagRepository::all PHP 메소드

all() 공개 메소드

Get all tags
public all ( ) : mixed
리턴 mixed
    public function all()
    {
        return $this->model->orderBy('hot', 'desc')->get();
    }

Usage Example

예제 #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'));
 }
All Usage Examples Of App\Repositories\TagRepository::all