예제 #1
0
 public function viewAdminParams()
 {
     return array_merge(parent::viewAdminParams(), ['category_id' => $this->category_id, 'categories' => Category::where('type', Category::LINK)->get()]);
 }
예제 #2
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int $id
  * @return \Illuminate\Http\Response
  */
 public function edit(Request $request, $id)
 {
     $link = Link::findOrFail($id);
     $this->theme->title([trans('pages.admin_links_title'), trans('form.action_edit')]);
     $this->theme->description(trans('pages.admin_links_desc'));
     return $this->_edit(['link' => $link, 'link_categories' => $link->categories, 'categories' => Category::where('type', Category::LINK)->get()]);
 }
예제 #3
0
 public function layoutSort(Request $request, $id)
 {
     $category = Category::where('type', Category::LINK)->where('id', $id)->firstOrFail();
     $this->theme->title([trans('pages.admin_link_categories_title'), trans('form.action_sort')]);
     $this->theme->description(trans('pages.admin_link_categories_desc'));
     return $this->_any('sort', ['category' => $category, 'links' => $category->links]);
 }