app/Http/Controllers/CategoryController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\Category  $category
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, Category $category)
    {
        $this->validate($request, [
            'name' => 'required|string|max:255'
        ]);
        $category->update($request->all());
        return redirect('admin/categories')->with('success', 'Category Edited Successfully');
    }
public function update ( Request $ request , Category $ category ) { $ this -> validate ( $ request , [ 'name' => 'required|string|max:255' ] ) ; $ category -> update ( $ request -> all ( ) ) ; return redirect ( 'admin/categories' ) -> with ( 'success' , 'Category Edited Successfully' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .