/**
  * Get all form input.
  *
  * @return array
  */
 public function all()
 {
     $input = parent::all();
     $this->dropzone = isset($input['dropzone']);
     if (isset($input['files']) && is_array($input['files'])) {
         // Having an [null] file array passes validation.
         $input['files'] = array_filter($input['files']);
     }
     if (isset($input['capcode']) && $input['capcode']) {
         $user = $this->user;
         if ($user && !$user->isAnonymous()) {
             $role = $user->roles->where('role_id', (int) $input['capcode'])->first();
             if ($role && $role->capcode != "") {
                 $input['capcode_id'] = (int) $role->role_id;
                 // $input['author']     = $user->username;
             } else {
                 $this->failedAuthorization();
             }
         } else {
             unset($input['capcode']);
         }
     }
     if (!$this->board->canPostWithAuthor($this->user, !!$this->thread)) {
         unset($input['author']);
     }
     if (!$this->board->canPostWithSubject($this->user, !!$this->thread)) {
         unset($input['subject']);
     }
     return $input;
 }