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
Post a Comment