Question Details

No question body available.

Tags

javascript laravel php-pest

Answers (2)

February 13, 2026 Score: 0 Rep: 150 Quality: Low Completeness: 50%

The problem is with Form Data, which is not being read by the laravel from playwright

Try changing the fetch to have the body in json

fetch('/', {
            method: 'POST',
            headers: {
                'Content-Type' : 'application/json'
            },
            body: JSON.stringify({
                'input' : 'Hello from JS!'
            })
        })

or try using form


    @csrf

Test

February 13, 2026 Score: 0 Rep: 115 Quality: Low Completeness: 30%

I have found the problem.

The issue is in pest-plugin-browser package. It does not support multipart form requests.

There is a PR (https://github.com/pestphp/pest-plugin-browser/pull/177) that tries to solve this issue.

I hope it get's merged and released soon.