/** * 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]); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $publications = Publication::all(); $data = array('publications' => $publications); return view('publications.publications', $data); /*foreach ($publications as $publication): echo $publication->title . '</br>' .$publication->author->name; endforeach; echo 'hello';*/ }
/** * Show the application dashboard to the user. * * @return Response */ public function index() { $publications = Publication::all(); return view('frontend.publications', compact('publications')); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $publication = \App\Publication::all(); return view('index', compact('publication')); }