Пример #1
0
 public function showGallery()
 {
     Visitor::log();
     Setting::get('config.logo', Null) ? $logoMain = asset('/files/img/' . Setting::get('config.logo')) : ($logoMain = asset('dist/img/logo.png'));
     $images = Gallery::orderBy('sort_id', 'asc')->get();
     $data = ['PageDescr' => Setting::get('config.galdesc'), 'PageWords' => Setting::get('config.galwords'), 'PageAuthor' => '', 'PageTitle' => Setting::get('config.galtitle'), 'logoMain' => $logoMain, 'totalNavLabel' => $this->totalNavLabel(), 'images' => $images];
     return view('gallery')->with($data);
 }
Пример #2
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroyImage($id)
 {
     //
     $image = Gallery::find($id);
     File::delete('files/gellery/' . $image->filename);
     File::delete('files/gellery/small/' . $image->filename);
     $image->delete();
 }