Hi - I'm wondering if anyone could give me pointers on how best to integrate my Laravel app into other front end websites.
In short I want to show a user who has just submitted a PDF through a form on an external website what is happening with the PDF (we analyse and report on quality) on my Laravel website.
The steps I have working to date are something like this:
Vanilla Website form/PDF submit <--> Laravel Website <--> PDF Analysis/Reporting tool.
- The user submits the form/PDF to a PHP (or other) script.
- cURL sends the id/URL of PDF to Laravel before redirecting the user's browser to the Laravel site.
On the Laravel site, the user can watch (via Broadcasting/Pusher) the download, analysis and reporting of the PDF analysis (it happens on another app that sends http update requests to Laravel).
- When complete, the user clicks a button and is redirected back to their originating website.
The advantage of the above it is relatively easy to write some vanilla PHP for the user website to get the id and URL across to Laravel and to redirect the browser. The disadvantage is they are redirected out of their site and back into it. Not seamless and if I do this for, say, five clients, I'm going to have to create five views to appromiately match the brand of the originalting site.
10 years ago, I might have kluged something with an iFrame so the user wouldn't have to leave their site.
Today, I'm not sure how to proceed. Do I stick with redirects? Or is there a better way? I've just started tinkering with Vue (I use it with Laravel Echo for the progress bars on the above). Is there some way to achieve something similar to an iFrame with a relatively portable view componont that the website owner could easily embed in the code of their site?
Thanks for any insights anyone can offer!