0

I want to call JavaScript file, but I got error that function is not found

I want to call JavaScript file on this page.

This is my blade:

I put this:

<script type="text/javascript" src="{{URL::asset('js/lihatjadwal.js')}}"></script>

enter image description here

This is my JavaScript file (lihatjadwal.js): enter image description here

This is my route: enter image description here

This is my controller: enter image description here

I got error like this: enter image description here enter image description here

Thank you if somebody want to help me :)

Ariful Islam
  • 7,639
  • 7
  • 36
  • 54
Yeru
  • 115
  • 3
  • 14
  • 1
    Please copy your code into the question. Images aren't effective for readability. – Lex Jan 08 '19 at 05:00

1 Answers1

0

You can't call laravel function to an external javascript file,

In you case you could use your url like,

url: '/daftarPeriksa/lihatjadwal',
type: "POST"

And try to use stackoverflow code editor instead of share image.

Md.Sukel Ali
  • 2,987
  • 5
  • 22
  • 34