public function postHapus(Request $request) { if (file_exists(Config::get('config.galeri_path') . $request->nm_gambar)) { unlink(Config::get('config.galeri_path') . $request->nm_gambar); } Galeri::where('id', $request->id_gambar)->delete(); }
public function galeri() { $data['galeri'] = Galeri::orderBy('id', 'desc')->paginate(18); return view('front.gallery.index', $data); }