/**
  * @param $uuid
  * @return mixed
  */
 public function edit(Board $entity, $uuid)
 {
     $board = Board::byUuid($uuid)->firstOrFail();
     $this->authorize('editBoard', $board);
     $flows = Flow::byModule('tasks')->get()->pluck('name', 'id')->toArray();
     $builder = new EntityFieldsFormBuilder($entity->getEntity());
     $builder->setRowId($board->id);
     return view('tasks::boards.edit')->with('flows', $flows)->with('board', $board)->with('boardFields', $builder->render());
 }
 /**
  * @param Board $board
  * @return array
  */
 protected function getAdditionalFields(Board $board)
 {
     $additionalFields = new EntityFieldPresenter($board->getEntity());
     $additionalFields->setRowId($board->id);
     $additional = [];
     foreach ($additionalFields->getFields() as $field) {
         if (method_exists($field, 'presentJson')) {
             $additional[] = ['name' => $field->fieldName, 'value' => $field->presentJson()];
         } else {
             $additional[] = ['name' => $field->fieldName, 'value' => $field->presentFront()];
         }
     }
     return $additional;
 }