public function form($model)
    {
        return $this->form->of('orchestra.users', function (FormGrid $form) use ($model) {
            $form->resource($this, 'orchestra/foundation::users', $model);

            $form->hidden('id');

            $form->fieldset(function (Fieldset $fieldset) {
                $fieldset->control('input:text', 'email')
                    ->label(trans('orchestra/foundation::label.users.email'));

                $fieldset->control('input:text', 'fullname')
                    ->label(trans('orchestra/foundation::label.users.fullname'));

                $fieldset->control('input:password', 'password')
                    ->label(trans('orchestra/foundation::label.users.password'));

                $fieldset->control('select', 'roles[]')
                    ->label(trans('orchestra/foundation::label.users.roles'))
                    ->attributes(['multiple' => true])
                    ->options(function () {
                        $roles = app('orchestra.role');

                        return $roles->pluck('name', 'id');
                    })
                    ->value(function ($user) {
                        // get all the user roles from objects
                        return $user->roles()->get()->pluck('id')->all();
                    });
            });
        });
    }