/**
  * Show the index page for Publication.
  *
  * @param Request $request
  * @return \Illuminate\View\View
  */
 public function managePublicationIndex(Request $request)
 {
     // If request is a search
     if ($request->method() === "PUT") {
         $publications = Publication::where('name', 'LIKE', '%' . $request->search . '%')->orWhere('reference', 'LIKE', '%' . $request->search . '%')->get();
     } else {
         $publications = Publication::all();
     }
     return view('admin.publication.index', ['publications' => $publications]);
 }
 /**
  * Get the list of specified Publication type.
  *
  * @return mixed
  */
 public static function getPublicationType($type)
 {
     return Publication::where('type', '=', $type)->get();
 }