1

I'm building a website with laravel and need to call an API controller method in jQuery.

I can do this with Ajax but is it possible to achieve without using Ajax or any get, post method.

I'm writing my script in view file under the script tag and want to call the controller method inside the document.ready function.

Saveen
  • 4,120
  • 14
  • 38
  • 41
fahad shaikh
  • 593
  • 1
  • 14
  • 29

1 Answers1

0

You need to pass a http request either with a get or post method to interact with the server or the controller method. Here are some ways you can make http request using javascript and also look here for more details

PorH
  • 31
  • 3