| @@ 72-78 (lines=7) @@ | ||
| 69 | DiscussConversationValidator::create($request->all())->validate(); |
|
| 70 | ||
| 71 | // Users that have the permission "manage.discuss" can bypass this rule. (Default to Administrator) |
|
| 72 | if (DiscussConversation::isFlooding('xetaravel.flood.discuss.conversation') && |
|
| 73 | !Auth::user()->hasPermission('manage.discuss') |
|
| 74 | ) { |
|
| 75 | return back() |
|
| 76 | ->withInput() |
|
| 77 | ->with('danger', 'Wow, keep calm bro, and try to not flood !'); |
|
| 78 | } |
|
| 79 | $conversation = DiscussConversationRepository::create($request->all()); |
|
| 80 | $post = $conversation->firstPost; |
|
| 81 | ||
| @@ 30-34 (lines=5) @@ | ||
| 27 | $conversation = DiscussConversation::findOrFail($request->conversation_id); |
|
| 28 | ||
| 29 | // Users that have the permission "manage.discuss" can bypass this rule. (Default to Administrator) |
|
| 30 | if (DiscussPost::isFlooding('xetaravel.flood.discuss.post') && !Auth::user()->hasPermission('manage.discuss')) { |
|
| 31 | return back() |
|
| 32 | ->withInput() |
|
| 33 | ->with('danger', 'Wow, keep calm bro, and try to not flood !'); |
|
| 34 | } |
|
| 35 | ||
| 36 | DiscussPostValidator::create($request->all())->validate(); |
|
| 37 | $post = DiscussPostRepository::create($request->all()); |
|