Esempio n. 1
0
 public function home()
 {
     $packageCategories = PackageCategory::all();
     $serviceSection = Page::where('identifier', 'home-service')->first();
     $overviewSection = Page::where('identifier', 'home-overview')->first();
     $testimonials = Testimonial::orderBy(DB::raw('RAND()'))->take(5)->get();
     return view('frontend.page.home', ['packageCategories' => $packageCategories, 'serviceSection' => $serviceSection, 'overviewSection' => $overviewSection, 'testimonials' => $testimonials]);
 }
 public function delete(Request $request, $id)
 {
     $testimonial = Testimonial::findOrFail($id);
     $testimonial->delete();
     return redirect()->route('admin.testimonial.index')->with('messages', ['Testimonial is successfully deleted.']);
 }