app/Http/Controllers/RdvsController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, $id)
    {
        $rdv = Rdv::find($id);
        $rdv->statut_rdv = 1;
        $rdv->save();
        if($rdv){
            $meeting = Meeting::find($id);    
            $meeting->statutMeet = 1;
            $meeting->save();
            if($meeting){
                $particite = ParticipeMeeting::create([
                    'user_id'       => Auth::id(),
                    'meeting_id'    => $meeting->id
                ]);
                if($particite){
                    return redirect()->route('rdv.show', $rdv->id);
                }
            }
        }
    }
public function update ( Request $ request , $ id ) { $ rdv = Rdv :: find ( $ id ) ; $ rdv -> statut_rdv = 1 ; $ rdv -> save ( ) ; if ( $ rdv ) { $ meeting = Meeting :: find ( $ id ) ; $ meeting -> statutMeet = 1 ; $ meeting -> save ( ) ; if ( $ meeting ) { $ particite = ParticipeMeeting :: create ( [ 'user_id' => Auth :: id ( ) , 'meeting_id' => $ meeting -> id ] ) ; if ( $ particite ) { return redirect ( ) -> route ( 'rdv.show' , $ rdv -> id ) ; } } } }
Update the specified resource in storage.
Update the specified resource in storage .