app/Http/Controllers/HomeController.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()
    {
        if($this->are_you_a_super_admin()){
            return view('home')->with('users',$this->getUsers());
        }
        if(Auth::user()->new_account != true){
            if($mps =  MemberParliament::where('user_id','=', Auth::id())->get()){
                return view('mps.index')->with('mps',$mps);
            }
        }
        $political_parties = PoliticalParty::where('user_id','=', Auth::id())->get();
        $committees = Committee::where('user_id','=', Auth::id())->get();
        return view('form-wizard')->with('genders',$this->genders)
            ->with('reserved_political_position_descriptions',$this->reserved_political_position_descriptions)
            ->with('political_parties',$political_parties)
            ->with('committees',$committees)
            ->with('countries',$this->countries)
            ->with('types_of_parliaments',$this->types_of_parliaments)
            ->with('political_designations',$this->political_designations)
            ->with('no_ide_bar',true);
    }
public function index ( ) { if ( $ this -> are_you_a_super_admin ( ) ) { return view ( 'home' ) -> with ( 'users' , $ this -> getUsers ( ) ) ; } if ( Auth :: user ( ) -> new_account != true ) { if ( $ mps = MemberParliament :: where ( 'user_id' , '=' , Auth :: id ( ) ) -> get ( ) ) { return view ( 'mps.index' ) -> with ( 'mps' , $ mps ) ; } } $ political_parties = PoliticalParty :: where ( 'user_id' , '=' , Auth :: id ( ) ) -> get ( ) ; $ committees = Committee :: where ( 'user_id' , '=' , Auth :: id ( ) ) -> get ( ) ; return view ( 'form-wizard' ) -> with ( 'genders' , $ this -> genders ) -> with ( 'reserved_political_position_descriptions' , $ this -> reserved_political_position_descriptions ) -> with ( 'political_parties' , $ political_parties ) -> with ( 'committees' , $ committees ) -> with ( 'countries' , $ this -> countries ) -> with ( 'types_of_parliaments' , $ this -> types_of_parliaments ) -> with ( 'political_designations' , $ this -> political_designations ) -> with ( 'no_ide_bar' , true ) ; }
Show the application dashboard.
Show the application dashboard .