I put my ajax here :
C:\xampp\htdocs\mysystemesources\views\users\create.blade
The code is like this :
@extends('layouts.app')
@section('content')
<section class="content-header">
...
</section>
<div class="content">
...
</div>
@endsection
@section('scripts')
<script type="text/javascript">
$(document).ready(function() {
$("#no").change(function() {
$.getJSON("{{ url('/users/no') }}/" + $("#id").val(), function(data) {
...
});
});
});
</script>
@endsection
It works
But I want to move it to global js
My globaljs here :
C:\xampp\htdocs\mysystem\public\js\main.js
I move the ajax there. But there exist error :
404 (Not Found)
How can I solve it?