| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | public function __invoke(ValidateTopicRequest $request, Topic $topic) |
||
| 13 | { |
||
| 14 | $topic->fill($request->validated()); |
||
| 15 | $topic->user_id = Auth::id(); |
||
|
|
|||
| 16 | $topic->save(); |
||
| 17 | |||
| 18 | return [ |
||
| 19 | 'message' => __('The topic was successfully created'), |
||
| 20 | 'redirect' => 'social.topics.edit', |
||
| 21 | 'param' => ['topic' => $topic->id], |
||
| 22 | ]; |
||
| 25 |