app/Http/Controllers/admin/TagController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(Request $request)
    {
        $request->validate([
            'name' => 'required',
            'slug' => 'required|unique:tags',
            'color' => 'required'
        ]);
        $tag = Tag::create($request->all());
        return redirect()->route('admin.tags.edit', compact('tag'))->with('info', 'la etiqueta se creó con éxito');;
    }
public function store ( Request $ request ) { $ request -> validate ( [ 'name' => 'required' , 'slug' => 'required|unique:tags' , 'color' => 'required' ] ) ; $ tag = Tag :: create ( $ request -> all ( ) ) ; return redirect ( ) -> route ( 'admin.tags.edit' , compact ( 'tag' ) ) -> with ( 'info' , 'la etiqueta se creó con éxito'); ; }
Store a newly created resource in storage.
Store a newly created resource in storage .
/* return $request->all();   */