Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

amitsolanki24_'s avatar

How can I create Iframe of a form in laravel.

Hey all,  How can I create an Iframe of a form in Laravel and use it on another domain, but I don't want to disable CSRF protection? 

So how can I achieve this?

0 likes
3 replies
tisuchi's avatar

@amitsolanki24_ You can simply add the @csrf token in the form.

Publish your CORS

Then add your domain:

'allowed_origins' => ['https://your-domain.com'],

Please or to participate in this conversation.