Why doesn't it work when running the ajax request? I want to implement the registration function but I can't.
2019-11-25 10:05:35
0
1
1090

image.png

script

<!-- ajax submits the current form-->
<script type="text/javascript">
$(function(){
          $('#register').on('click',function(){
                                                use  -- to submit user information
                    $.ajax({
                                                             'post',
          url: "{:url('insert')}&q

public function insert()
{ //The front-end submission must be an Ajax request and then verify and add new operations
if (Request::isAjax()) {
//1. Data verification
          $data = Request::post(); //Data to be verified
           $rule = 'app\common\validate\User';  //Customized validator

                   

reply all(1)
A峰

Let’s see what error the system reports when making a request

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template