msassa
59
1
Vue

Create a distributable widget with VueJS in Laravel backend

Posted 2 weeks ago by msassa

I have this backend made in Laravel, and I need through an api endpoint delivery some slider widget. Something like when I call https://backend.com/api/v2/slider/2 the api respond something like:

<link href="https://backend.com/css/slider.css" rel=stylesheet>
<vue-slider title="Example Slider"></vue-slider>
<script src="https://backend.com/js/slider.js">

I found this excellent article https://itnext.io/vuidget-how-to-create-an-embeddable-vue-js-widget-with-vue-custom-element-674bdcb96b97 and I think is what I'm looking for, but is make in vue-cli and I can't figure out how to adapt that in my laravel application.

If any one have some ideas, or a better way, thanks !!!

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.