PATH:
home
/
lab2454c
/
aficb.com
/
app
/
Http
/
Controllers
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Models\Testimonial; use App\Models\Explore; use App\Models\FeaturedProduct; use App\Models\Service; class HomeController extends Controller { /** * Create a new controller instance. * * @return void */ public function __construct() { $this->middleware('auth')->except([ 'showHome' ]); } /** * Show the application dashboard. * * @return \Illuminate\Contracts\Support\Renderable */ public function dashboard() { return view('frontend.dashboard'); } public function showHome() { $data['testimonials'] = Testimonial::where('status', 'active')->orderBy('created_at', 'DESC')->get(); $data['explores'] = Explore::where('status', 'active')->orderBy('created_at', 'DESC')->get(); $data['services'] = Service::where('status', 'active')->orderBy('created_at', 'DESC')->get(); $data['products'] = FeaturedProduct::where('status', 'active')->orderBy('created_at', 'DESC')->take(3)->get(); return view('frontend.home', $data); } }
[+]
..
[-] Controller.php
[edit]
[+]
Admin
[+]
Auth
[-] SiteController.php
[edit]
[-] HomeController.php
[edit]