Esempio n. 1
0
 public function postEdit(Category $cat)
 {
     $cat->title = $this->request->get('title');
     $cat->parent_id = $this->request->get('parent_id');
     $cat->language = $this->request->get('language');
     $cat->save();
     return $this->redirector->route('cat.getEdit', ['id' => $cat->id]);
 }
Esempio n. 2
0
 private function get_categories()
 {
     $cats = Category::all();
     $cats_array[0] = "...";
     foreach ($cats as $cat) {
         $cats_array[$cat->id] = $cat->title;
     }
     return $cats_array;
 }