public function delete($id) { $slaider = Slaider::find($id); $image = $slaider->image_url; $slaider->delete(); if (!empty($image)) { unlink("admin/slaider/" . $image); unlink("admin/slaider/450x250_" . $image); } return redirect(LaravelLocalization::setLocale() . DIRECTORY_SEPARATOR . 'admin-slaider')->with('status', 'Категория е изтрита!'); }
public function index() { //$_SERVER['REMOTE_ADDR'] //BG RO GR $tags = json_decode(file_get_contents('http://getcitydetails.geobytes.com/GetCityDetails?fqcn=' . '81.12.128.0'), true); //dd($tags['geobytesinternet']); $this->meta(); $slaider = Slaider::all(); $checke_product = Product::where('checked', 1)->get(); return view('home', compact('slaider', 'checke_product')); }
public function index() { $slaider = Slaider::all(); $othercat = Category::where('main_category', 2)->orWhere('main_category', 3)->get(); return view('home', compact('slaider', 'othercat')); }