Пример #1
0
 public function items()
 {
     $pages_categories = Category::all();
     $publication_categories = PublicationCategory::all();
     $modules = ['tenders', 'trainings', 'news', 'faqs', 'videos', 'galleries'];
     return view('menuitems.items', compact('pages_categories', 'publication_categories', 'modules'));
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function publish($slug)
 {
     $category = PublicationCategory::find($slug);
     $category->update(['is_published' => $category->is_published ? 0 : 1]);
     return Redirect::route('publications-categories.admin');
 }
Пример #3
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $pub = Publication::find($id);
     $categories = PublicationCategory::all()->lists('title_en', 'id');
     return view('publications.edit', compact('pub', 'categories'));
 }