app/Http/Controllers/Dashboard/Categories.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(Category $category , Request $request)
    {
        $requestArray = request()->validate([
            'name'          => ['required' , 'max:191'],
            'meta_keywords' => ['max:191'],
            'meta_des'      => ['max:191'],
        ]);
        $category->update($requestArray);
        alert()->success('Category is Updated' , 'Done');
        return redirect()->route('categories.index');
    }
public function update ( Category $ category , Request $ request ) { $ requestArray = request ( ) -> validate ( [ 'name' => [ 'required' , 'max:191' ] , 'meta_keywords' => [ 'max:191' ] , 'meta_des' => [ 'max:191' ] , ] ) ; $ category -> update ( $ requestArray ) ; alert ( ) -> success ( 'Category is Updated' , 'Done' ) ; return redirect ( ) -> route ( 'categories.index' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .