/**
  *
  */
 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);
     }
 }
Пример #2
0
 /**
  * Get the widget data to send to the view
  * @return string
  */
 protected function data()
 {
     return ['categoryCount' => $this->category->all()->count()];
 }
Пример #3
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $categories = $this->category->all();
     return view('blog::admin.categories.index', compact('categories'));
 }