| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 14 | public function __invoke(ValidatePersonStore $request) |
||
| 15 | { |
||
| 16 | $company = Company::find($request->get('company_id')); |
||
| 17 | $personId = $request->get('id'); |
||
| 18 | |||
| 19 | $this->authorize('manage-people', $company); |
||
| 20 | |||
| 21 | $company->attachPerson($personId, $request->get('position')); |
||
| 22 | |||
| 23 | return ['message' => __('The person was successfully assigned')]; |
||
| 24 | } |
||
| 26 |