app/Http/Controllers/AnnoncesController.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)
    {           
        $annonce = Annonce::find($id);
        $annonce->statut_ann = 1;
        $annonce->save();
        return redirect()->route('annonces.show', $annonce->id);
    }
public function update ( Request $ request , $ id ) { $ annonce = Annonce :: find ( $ id ) ; $ annonce -> statut_ann = 1 ; $ annonce -> save ( ) ; return redirect ( ) -> route ( 'annonces.show' , $ annonce -> id ) ; }
Update the specified resource in storage.
Update the specified resource in storage .