| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 1 |
| Changes | 3 | ||
| Bugs | 0 | Features | 2 |
| 1 | <?php |
||
| 35 | 2 | public function store(Request $request) |
|
| 36 | { |
||
| 37 | 2 | $this->validate($request, [ |
|
| 38 | 2 | 'name' => 'required|string|max:255', |
|
| 39 | 'location' => 'required|string|max:255', |
||
| 40 | ]); |
||
| 41 | |||
| 42 | 1 | $supplier = Supplier::create($request->only(['name', 'location'])); |
|
| 43 | 1 | event(new SupplierWasCreated($supplier)); |
|
| 44 | 1 | } |
|
| 45 | |||
| 58 |