src/Concerns/Creator.php
public function open(array $options = []): Htmlable
    {
        $method = $options['method'] ?? 'post';

        // We need to extract the proper method from the attributes. If the method is
        // something other than GET or POST we'll use POST since we will spoof the
        // actual method since forms don't support the reserved methods in HTML.
        $attributes = [
            'method'         => $this->getMethod($method),
            'action'         => $this->getAction($options),
            'accept-charset' => 'UTF-8',
        ];

        // If the method is PUT, PATCH or DELETE we will need to add a spoofer hidden
        // field that will instruct the Symfony request to pretend the method is a
        // different method than it actually is, for convenience from the forms.
        $append = $this->getAppendage($method);

        if (isset($options['files']) && $options['files']) {
            $options['enctype'] = 'multipart/form-data';
        }

        // Finally we're ready to create the final form HTML field. We will attribute
        // format the array of attributes. We will also add on the appendage which
        // is used to spoof requests for this PUT, PATCH, etc. methods on forms.
        $attributes = \array_merge($attributes, Arr::except($options, $this->reserved));

        // Finally, we will concatenate all of the attributes into a single string so
        // we can build out the final form open statement. We'll also append on an
        // extra value for the hidden _method field if it's needed for the form.
        $attributes = $this->getHtmlBuilder()->attributes($attributes);

        return $this->toHtmlString('<form'.$attributes.'>'.$append);
    }
public function open(array $options = []): Htmlable
    {
        $method = $options['method'] ?? 'post';

        // We need to extract the proper method from the attributes. If the method is
        // something other than GET or POST we'll use POST since we will spoof the
        // actual method since forms don't support the reserved methods in HTML.
        $attributes = [
            'method'         => $this->getMethod($method),
            'action'         => $this->getAction($options),
            'accept-charset' => 'UTF-8',
        ];

        // If the method is PUT, PATCH or DELETE we will need to add a spoofer hidden
        // field that will instruct the Symfony request to pretend the method is a
        // different method than it actually is, for convenience from the forms.
        $append = $this->getAppendage($method);

        if (isset($options['files']) && $options['files']) {
            $options['enctype'] = 'multipart/form-data';
        }

        // Finally we're ready to create the final form HTML field. We will attribute
        // format the array of attributes. We will also add on the appendage which
        // is used to spoof requests for this PUT, PATCH, etc. methods on forms.
        $attributes = \array_merge($attributes, Arr::except($options, $this->reserved));

        // Finally, we will concatenate all of the attributes into a single string so
        // we can build out the final form open statement. We'll also append on an
        // extra value for the hidden _method field if it's needed for the form.
        $attributes = $this->getHtmlBuilder()->attributes($attributes);

        return $this->toHtmlString('<form'.$attributes.'>'.$append);
    }
Open up a new HTML form.

@param  array   $options

@return \Illuminate\Contracts\Support\Htmlable