app/Http/Controllers/NavbarController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\Models\Navbar  $navbar
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, Navbar $navbar)
    {
        $this->authorize("update", Navbar::class);
        request()->validate([
            "chemin"=>["required"]
        ]);
        $navbar->chemin = $request->chemin;
        $navbar->save();
        return redirect('/');
    }
public function update ( Request $ request , Navbar $ navbar ) { $ this -> authorize ( " update " , Navbar :: class ) ; request ( ) -> validate ( [ " chemin " => [ " required " ] ] ) ; $ navbar -> chemin = $ request -> chemin ; $ navbar -> save ( ) ; return redirect ( '/' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .