app/Http/Controllers/InvitationsController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index()
    {
        $personne = Personne::find(Auth::user()->personne_id);  
        $invitations = Invitation::where([['structure_id', $personne->structure_id], ['statut', 0]])->get()->load('structure', 'salon');
        $invit_confirm = Invitation::where([['structure_id', $personne->structure_id], ['statut', 1]])->get()->load('structure', 'salon');
        return view('invitations.index', compact('invitations','invit_confirm'));
    }
public function index ( ) { $ personne = Personne :: find ( Auth :: user ( ) -> personne_id ) ; $ invitations = Invitation :: where ( [ [ 'structure_id' , $ personne -> structure_id ] , [ 'statut' , 0 ] ] ) -> get ( ) -> load ( 'structure' , 'salon' ) ; $ invit_confirm = Invitation :: where ( [ [ 'structure_id' , $ personne -> structure_id ] , [ 'statut' , 1 ] ] ) -> get ( ) -> load ( 'structure' , 'salon' ) ; return view ( 'invitations.index' , compact ( 'invitations' , 'invit_confirm' ) ) ; }
Display a listing of the resource.
Display a listing of the resource .
//dd($personne->structure_id);