app/Http/Controllers/AdminCategoryController.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) {
        $request->validate([
            'name' => 'required',
        ]);
        $category = Category::find($id);
        $category->update($request->all());
        return redirect('/admin/category');
    }
public function update ( Request $ request , $ id ) { $ request -> validate ( [ 'name' => 'required' , ] ) ; $ category = Category :: find ( $ id ) ; $ category -> update ( $ request -> all ( ) ) ; return redirect ( '/admin/category' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .