app/Http/Controllers/NavitemController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\Navitem  $navitem
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, Navitem $navitem)
    {
        $data=request()->validate([
            'nav_name'=>'required',
            'nav_url'=>'required',
        ]);
       $navitem->update($data);
       return redirect('/navitem');
    }
public function update ( Request $ request , Navitem $ navitem ) { $ data = request ( ) -> validate ( [ 'nav_name' => 'required' , 'nav_url' => 'required' , ] ) ; $ navitem -> update ( $ data ) ; return redirect ( '/navitem' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .