thread = $getThreadTask->bySlug($this->route('slug'), ['forum']); if(is_null($this->thread)) { abort(404, __('The desired thread does not exist.')); } if(!$this->user()->forumPermissions[$this->thread->forum_uuid]->create_posts) { abort(403, __('You are not authorized to create postings in this forum.')); } return true; } /** * @return array */ public function rules(): array { return []; } /** * @return array */ public function messages(): array { return []; } }