summaryrefslogtreecommitdiff
path: root/src/products/app/Http/Controllers/ProductsController.php
diff options
context:
space:
mode:
authorMichiel Schuurmans <michielschuurmans@gmail.com>2020-10-01 22:07:18 +0200
committerMichiel Schuurmans <michielschuurmans@gmail.com>2020-10-01 22:07:18 +0200
commitadaa761b061bdb1dcfcdfcafa996c770149eb9ff (patch)
treeba362d06b1d23045e7ec5c39edac9d92cd62afa1 /src/products/app/Http/Controllers/ProductsController.php
parenta7975976780e2370eade4e041e505273c7d1e2a9 (diff)
Brands: Add brand table
Signed-off-by: Michiel Schuurmans <michielschuurmans@gmail.com>
Diffstat (limited to 'src/products/app/Http/Controllers/ProductsController.php')
-rw-r--r--src/products/app/Http/Controllers/ProductsController.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/products/app/Http/Controllers/ProductsController.php b/src/products/app/Http/Controllers/ProductsController.php
index 58de828..30816d6 100644
--- a/src/products/app/Http/Controllers/ProductsController.php
+++ b/src/products/app/Http/Controllers/ProductsController.php
@@ -15,7 +15,8 @@ class ProductsController extends Controller
public function create(Request $request)
{
$this->validate($request, [
- 'name' => 'required|unique:products'
+ 'name' => 'required|unique:products',
+ 'brand_id' => 'required'
]);
$product = Product::create($request->all());