/** * */ private function emptyBlogTables() { foreach ($this->post->all() as $post) { $this->post->destroy($post); } foreach ($this->category->all() as $category) { $this->category->destroy($category); } foreach ($this->tag->all() as $tag) { $this->tag->destroy($tag); } }
/** * Get the widget data to send to the view * @return string */ protected function data() { return ['categoryCount' => $this->category->all()->count()]; }
/** * Display a listing of the resource. * * @return Response */ public function index() { $categories = $this->category->all(); return view('blog::admin.categories.index', compact('categories')); }