app/Http/Controllers/MahasiswaController.php
/**
     * Show the application dashboard.
     *
     * @return \Illuminate\Contracts\Support\Renderable
     */
Show the application dashboard.
@return \Illuminate\Contracts\Support\Renderable
Show the application dashboard . @return \ Illuminate \ Contracts \ Support \ Renderable
public function index()
    {
        $peng = Pengaduan::where('mahasiswa_id', Auth::guard('mahasiswa')->user()->id)->get();
        $selesai = Pengaduan::where('mahasiswa_id', Auth::guard('mahasiswa')->user()->id)->
                            where('status','=','SELESAI')->get();
        $tots = $selesai->count();
        $tot = $peng->count();
        return view('mahasiswa.dashboard',compact('tot','tots'));
    }
public function index ( ) { $ peng = Pengaduan :: where ( 'mahasiswa_id' , Auth :: guard ( 'mahasiswa' ) -> user ( ) -> id ) -> get ( ) ; $ selesai = Pengaduan :: where ( 'mahasiswa_id' , Auth :: guard ( 'mahasiswa' ) -> user ( ) -> id ) -> where ( 'status' , '=' , 'SELESAI' ) -> get ( ) ; $ tots = $ selesai -> count ( ) ; $ tot = $ peng -> count ( ) ; return view ( 'mahasiswa.dashboard' , compact ( 'tot' , 'tots' ) ) ; }
Show the application dashboard.
Show the application dashboard .