From b20cc6f7ef6c22b1e857c3ad3848ef943cceab4c Mon Sep 17 00:00:00 2001 From: Morten Poul Jensen <mpj@signifly.com> Date: Thu, 23 May 2019 14:10:59 +0200 Subject: [PATCH] Update readme --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 9534dda..85c26e8 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,14 @@ class ProductController extends Controller return $this->respond($paginator); } + public function store(Request $request) + { + $product = Product::create($request->all()); + + return $this->respond($product->fresh()) + ->setStatusCode(201); + } + public function show(Product $product) { return $this->respond($product);