Пример #1
0
 public function home(SliderRepository $sliderRepository)
 {
     $products = Product::active()->take(12)->get();
     $sliders = $sliderRepository->scopes('active')->findAll();
     //$this->flashSuccessOverlay('祝贺你!');
     return view('cms::__front.home', compact('products', 'sliders'));
 }
Пример #2
0
 public function destroy(Slider $slider)
 {
     $this->sliderRepository->delete($slider);
     $this->flashSuccess('delete');
     return redirect()->route('admin::sliders.index');
 }