original_string: 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();
                      });
              });
          });
      }
code: 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();
                      });
              });
          });
      }
code_tokens: 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 ( ) ; } ) ; } ) ; } ) ; }
docstring: Form View Generator for Orchestra\Model\User.
  
  @param  \Orchestra\Model\User  $model
  
  @return \Orchestra\Contracts\Html\Form\Builder
docstring_tokens: Form View Generator for Orchestra \ Model \ User .