Question By
Unsolved

How do i fetch an external php class to javascript

nicholas-wekesa

May 27th, 2020 09:52 AM

I have some javascript code within my view in laravel and i am trying to fetch an external php class within the Javascript. How do i do this in Laravel?

						const merchantURL = " **THE PHP CLASS URL COME IN HERE**";
cookie

May 28th, 2020 07:33 AM

You have to build something like a API with Lravel and write your merhods in JS.

Or .. give Laravel-Livewire and AlpineJS a shot ;-)