app/Http/Controllers/AbonnementController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\Models\abonnement  $abonnement
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, abonnement $abonnement )
    {
        $abonnement->payment = $request->pay; 
        $abonnement->date_dubet = $request->dateD;
        $abonnement->date_fine = DB::raw('DATE_ADD(date_dubet, INTERVAL 1 MONTH)');
        $abonnement->save();
        return redirect()->back();
    }
public function update ( Request $ request , abonnement $ abonnement ) { $ abonnement -> payment = $ request -> pay ; $ abonnement -> date_dubet = $ request -> dateD ; $ abonnement -> date_fine = DB :: raw ( 'DATE_ADD(date_dubet, INTERVAL 1 MONTH)' ) ; $ abonnement -> save ( ) ; return redirect ( ) -> back ( ) ; }
Update the specified resource in storage.
Update the specified resource in storage .
// Session::flash('success', 'Post updated successfully');