app/Http/Controllers/admin/TagController.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, Tag $tag)
    {
        $request->validate([
            'name' => 'required',
            'slug' => "required|unique:tags,slug,$tag->id",
            'color' => 'required'
        ]);
        $tag->update($request->all());
        return redirect()->route('admin.tags.edit', $tag)->with('info', 'la etiqueta se editó con éxito');
    }
public function update ( Request $ request , Tag $ tag ) { $ request -> validate ( [ 'name' => 'required' , 'slug' => " required|unique:tags,slug, $ tag -> id " , 'color' => 'required' ] ) ; $ tag -> update ( $ request -> all ( ) ) ; return redirect ( ) -> route ( 'admin.tags.edit' , $ tag ) -> with ( 'info' , 'la etiqueta se editó con éxito'); }
Update the specified resource in storage.
Update the specified resource in storage .