app/Http/Presenters/WorkRequest/WorkRequestPresenter.php
public function form(WorkRequest $request)
    {
        return $this->form->of('work-requests', function (FormGrid $form) use ($request) {
            if ($request->exists) {
                $method = 'PATCH';
                $url = route('maintenance.work-requests.update', [$request->getKey()]);
                $form->submit = 'Save';
            } else {
                $method = 'POST';
                $url = route('maintenance.work-requests.store');
                $form->submit = 'Create';
            }

            $form->with($request);

            $form->attributes(compact('method', 'url'));

            $form->fieldset(function (Fieldset $fieldset) {
                $fieldset
                    ->control('input:text', 'subject')
                    ->attributes([
                        'placeholder' => 'Enter Subject',
                    ]);

                $fieldset
                    ->control('input:text', 'best_time')
                    ->attributes([
                        'placeholder' => 'Enter Best Time',
                    ]);

                $fieldset
                    ->control('input:textarea', 'description');
            });
        });
    }
public function form(WorkRequest $request)
    {
        return $this->form->of('work-requests', function (FormGrid $form) use ($request) {
            if ($request->exists) {
                $method = 'PATCH';
                $url = route('maintenance.work-requests.update', [$request->getKey()]);
                $form->submit = 'Save';
            } else {
                $method = 'POST';
                $url = route('maintenance.work-requests.store');
                $form->submit = 'Create';
            }

            $form->with($request);

            $form->attributes(compact('method', 'url'));

            $form->fieldset(function (Fieldset $fieldset) {
                $fieldset
                    ->control('input:text', 'subject')
                    ->attributes([
                        'placeholder' => 'Enter Subject',
                    ]);

                $fieldset
                    ->control('input:text', 'best_time')
                    ->attributes([
                        'placeholder' => 'Enter Best Time',
                    ]);

                $fieldset
                    ->control('input:textarea', 'description');
            });
        });
    }
Returns a new form for the specified work request.

@param WorkRequest $request

@return \Orchestra\Contracts\Html\Builder