public function management() { if (User::is_admin()) { $images = Image::all(); return view('image.management', compact('images')); } else { return redirect('/')->with('message', 'you must login to open this page'); } }