app/Http/Controllers/DashboardController.php
/**
     * Show the application dashboard.
     *
     * @return \Illuminate\Http\Response
     */
Show the application dashboard.
@return \Illuminate\Http\Response
Show the application dashboard . @return \ Illuminate \ Http \ Response
public function index()
    {
        $approved = User::where('status', '=', '1')->count() - 1;
        $notapproved = User::where('status', '=', '0')->count();
        $userdata = Result::all()->count();
        $hrindex = HRIndex::all()->count();
        $bpindex = BPIndex::all()->count();
        $hrnutri = HRNutrition::all()->count();
        $bpnutri = BPNutrition::all()->count();
        $data = array(
            'approved' => $approved,
            'notapproved' => $notapproved,
            'userdata' => $userdata,
            'records' => $hrindex + $hrnutri + $bpindex + $bpnutri);
        return view('dashboard')->with($data);
    }
public function index ( ) { $ approved = User :: where ( 'status' , '=' , '1' ) -> count ( ) - 1 ; $ notapproved = User :: where ( 'status' , '=' , '0' ) -> count ( ) ; $ userdata = Result :: all ( ) -> count ( ) ; $ hrindex = HRIndex :: all ( ) -> count ( ) ; $ bpindex = BPIndex :: all ( ) -> count ( ) ; $ hrnutri = HRNutrition :: all ( ) -> count ( ) ; $ bpnutri = BPNutrition :: all ( ) -> count ( ) ; $ data = array ( 'approved' => $ approved , 'notapproved' => $ notapproved , 'userdata' => $ userdata , 'records' => $ hrindex + $ hrnutri + $ bpindex + $ bpnutri ) ; return view ( 'dashboard' ) -> with ( $ data ) ; }
Show the application dashboard.
Show the application dashboard .