我通过ajax使用serialize方法发布数据但是无法在laravel控制器中获取数据
$scope.submit = function() {
var data = $('#JobPostStepOne').serialize() + '&step=1';
$http({
method : 'POST',
url : baseUrl + "/employer/addJobPost",
data : data,
headers : { 'X-CSRF-Token' : $('meta[name=csrf-token]').attr('content') }
}).success(function(data, status) {
$scope.status = status;
$scope.data = data;
$scope.result = data;
console.log(result);
}).error(function(data, status) {
$scope.data = data || "Request failed";
$scope.status = status;
});
return false;
};
发布这样的数据
_token=c9fYks8d4vGYZZWtX3MY9DvbqrRVFDu7j3vXF3Ms&jobma_job_post_id=&mode=add&step=1&company_designation=afds&job_type=Permanent&job_description=&company_keywords=&qualification=&min_experience=&max_experience=&salary_type=&job_currency=&min_salary=&max_salary=&salary_negotiable_val=0&job_notice=&step=1
public function addJobposting(Request $request) {
dd(Input::get('name'));
dd ($request->get('name'));
它显示我的空值