Exemplo n.º 1
0
 public function getCategories()
 {
     return Category::orderBy('id', 'desc')->where("published", 1)->get();
 }
 public function run()
 {
     Category::create(['id' => 1, 'name' => 'Без категории', 'description' => 'Категория по умолчанию']);
 }