FounderStartup's avatar

Need advice for a button functionality on frontend with site developed laravel only.

Imagine an ecommerce page with list of products and you can click on a BUY button infront of each product. A user could click BUY buttons of multiple products without the page being reloaded. The BUY button changes to "PURCHASED" when clicked. I have something similar functionality. But I have developed the site using laravel 8 only. In my site the page refreshes overtime the user clicks on the BUY button. I don't know much about javascript or any framework. What is the best option for me to implement faster frontend functionality ?

0 likes
6 replies
jlrdw's avatar

With many of the javascript / ajax lessons being free, maybe view some of them. @jeffreyway teaches all sorts of techniques. Also if you paid for subscription, maybe look over livewire.

But I suggest javascript and ajax for your needs. But of course you need to learn some first.

1 like
FounderStartup's avatar

@jlrdw Thanks. Ajax coding seems to be a bit difficult to understand. Is it better to learn Vue JS ? But what I Need to learn before I venture into Vue JS ?

jlrdw's avatar

@FounderStartup vue js is a javascript framework, used many times with axios js. And yes like many trades / crafts, there is a big learning curve.

1 like
FounderStartup's avatar

@jlrdw I know a bit of javascript but overwhelmed by ajax with Jquery code :) Thought I have used ajax at few places of my laravel project but I find it difficult to understand Query code :)

Is it better to learn Vue JS for laravel project ? As compared to learning javascript with query ?

jlrdw's avatar
jlrdw
Best Answer
Level 75

@FounderStartup

I find it difficult to understand Query code

The back end queries are the same with or without ajax. You just return the data differently, usually a json response or a server fetched partial.

And if you do choose livewire, there is a learning curve there also.

1 like

Please or to participate in this conversation.