예제 #1
0
 public function index($trashed = false)
 {
     $this->authorize('blog.categories.list');
     $categories = $this->category->with(['posts']);
     $categories = $trashed ? $categories->onlyTrashed()->paginate(30) : $categories->paginate(30);
     $title = 'Blog - Categories';
     $this->setTitle($title);
     $this->addBreadcrumb('List all categories');
     return $this->view('foundation.categories.list', compact('categories', 'trashed'));
 }