Laravel: MethodNotAllowedHttpException in RouteCollection.php (line 251) -


have ajax request in page , give me error

route file:

route::post('/record/store','recordscontroller@store').  

the sortsbercs function return array data, problem occur when array data big, if call dd() before return array in function it's show array, when call dd() after

$all_records = $this->sortsbercs($record_data,$sensetive_date,$unique_id);  

this row, it's return error methodnotallowedhttpexception in routecollection.php (line 251).

store function:

    public function store(request $request)     {          $record_data = $request->record_data;          $sensetive_date = $request->sensetive_date;          $unique_id= $request->unique_id;          $all_records = $this->sortsbercs($record_data,$sensetive_date,$unique_id);          return json_encode($all_records);      }  

javascript :

data = {}; data = $('form').serialize(); data += "&unique_id="+unique_id; $.ajax({     type: 'post',     url: '/record/store',     data: data }); 

any appreciated

i'm not sure sortsbercs(), try sortby may solution.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -