/** * Store a newly created postList in storage. * * @param \Illuminate\Http\Request $request * @return \Dingo\Api\Http\Response */ public function store(Request $request) { $postListData = $this->buildPostListFromRequest($request); $postList = $this->postList->create($postListData); $this->syncRelationships($postList, $request); return $this->response->item($postList, new PostListTransformer()); }
/** * @param PostListCreateRequest $request * @return \Illuminate\Http\RedirectResponse */ public function store(PostListCreateRequest $request) { $postList = PostList::create($this->buildListFromRequest($request)); return redirect()->route('admin::post-lists.index'); }
/** * @param Request $request */ public function store(Request $request) { PostList::create($request->all()); }