/** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(ProductRequest $request) { $this->product->fill($request->all()); $this->product->save(); /** * Sync Tags */ $this->product->tags()->sync($this->getTagIds($request->tag_list)); return redirect()->route('admin.products'); }
/** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(Request $request) { $product = $this->product->save($request->all()); }