app/Http/Controllers/HomeController.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()
    {
        $result = $this->userRepo->profileHome();
        $result = json_decode(json_encode($result['body']), true);
        $user = $result['user'];
        $total_waste = $result['total_waste'];
        $total_transfers = $result['total_transfers'];
        $total_requests = $result['total_requests'];
        return view('home', compact('user', 'total_waste', 'total_transfers', 'total_requests'));
    }
public function index ( ) { $ result = $ this -> userRepo -> profileHome ( ) ; $ result = json_decode ( json_encode ( $ result [ 'body' ] ) , true ) ; $ user = $ result [ 'user' ] ; $ total_waste = $ result [ 'total_waste' ] ; $ total_transfers = $ result [ 'total_transfers' ] ; $ total_requests = $ result [ 'total_requests' ] ; return view ( 'home' , compact ( 'user' , 'total_waste' , 'total_transfers' , 'total_requests' ) ) ; }
Show the application dashboard.
Show the application dashboard .