/** * Handle an incoming request. * Determines if the user is the administrator of the website. * The administrator is the first user of the database. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @param string|null $guard * @return mixed */ public function handle($request, Closure $next, $guard = null) { $itemtypes = Itemtype::all(); Session::forget('itemtypes'); Session::put('itemtypes', $itemtypes); $biblios = Biblio::all(); Session::forget('biblios'); Session::put('biblios', $biblios); return $next($request); }
/** * Show the view with the details of all biblios */ public function index() { $biblios = Biblio::all(); return view('admin.biblios.index', ['biblios' => $biblios]); }