Example #1
0
 /**
  * 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());
 }
Example #2
0
 /**
  * @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');
 }
Example #3
0
 /**
  * @param Request $request
  */
 public function store(Request $request)
 {
     PostList::create($request->all());
 }