I want to send OTP with Laravel and ajax but when i'm calling ajax it shows error page not found...

HTML:

`

```
                    <div id="first_step">
                        <div class="col-md-4">
                            <input value="+91" type="text" placeholder="+1" id="country_code" name="country_code" />
                        </div> 

                        <div class="col-md-8">
                            <input type="text" autofocus id="phone_number" class="form-control" placeholder="Enter Phone Number" name="phone_number" value="{{ old('phone_number') }}" />
                        </div>
                         <div class="col-md-4">

                        </div> 
                         <div class="col-md-8 " id="otp_input">
                            <input type="text" autofocus id="user_otp" class="form-control" placeholder="Enter OTP" name="otp" id="result" value="{{ old('phone_number') }}" /> 
                        </div>
                        <div class="col-md-12" style="padding-bottom: 10px;" id="mobile_verfication1"> </div>
                           <div class="col-md-12" style="padding-bottom: 10px;" id="mobile_verfication">
                            <input type="button" class="log-teal-btn small" id="send_otp_button" value="Verify Phone Number"/>
                        </div>

                    </div>

```

`

script:

```
$('#send_otp_button').on('click', function(e) {
   e.preventDefault(); 
   var phone_number = $('#phone_number').val();
   alert(phone_number);
   var host = "{{URL::to('/')}}";
   alert(host);
 $.ajax({
       type: "POST",
       url: host+"/send_otp",
       data: {name:phone_number},
       success: function( msg ) {
           alert( msg );
       },
       error: function (request, status, error) {
    alert(request.responseText);
}
   }); });

```

Route in web.php:

```
Route::post('/send_otp', 'AccountAuth\RegisterController@send_otp_function');

```

//Route::post('/send\_otp', 'AccountAuth\RegisterController@send\_otp\_function'); also try this

Controllers:

```
public function send_otp_function(Request $request)
{
 $response = array(
        'status' => 'success',
        'msg' => 'Setting created successfully',
    );
    return Response::json($response);
}

```