/**
* Create new instance of eloquent type.
*
* @param Model $model
*/
public function __construct(Model $model, $name = '')
{
$this->name = $name;
$this->fields = collect();
$this->hiddenFields = collect($model->getHidden())->flip();
$this->model = $model;
$this->camelCase = config('relay.camel_case', false);
}