Angularjs 角度http post到Laravel后端请求始终为空

Angularjs 角度http post到Laravel后端请求始终为空,angularjs,ajax,laravel-5,laravel-5.1,Angularjs,Ajax,Laravel 5,Laravel 5.1,我有一个我不知道如何解决的问题。 我使用AngularJS 1向我的后端发布帖子(Laravel 5.1)。 这篇文章来自AngularJS 在我的Laravel控制器中,我使用Request从AngulrJS接收发布的数据,但是$Request->all()总是空的,我不知道为什么 我在我的发帖请求中遗漏了什么 LARAVEL ROUTE: Route::post('/signup','SignupController@Signup'); LARAVEL CONTROLLER: <

我有一个我不知道如何解决的问题。 我使用AngularJS 1向我的后端发布帖子(Laravel 5.1)。 这篇文章来自AngularJS

在我的Laravel控制器中,我使用Request从AngulrJS接收发布的数据,但是$Request->all()总是空的,我不知道为什么

我在我的发帖请求中遗漏了什么

LARAVEL ROUTE:

Route::post('/signup','SignupController@Signup');


LARAVEL CONTROLLER:
<?php


namespace App\Http\Controllers;
use Illuminate\Http\Request;

class SignupController extends Controller
{
    public function Signup(Request $request){


       dd($request->all()); <-- is always empty
    }  
}

尝试使用
$httpParamSerializer
将有效负载格式化为url编码的表单数据

.controller('SignupCtrl',function($scope,$http,$state,$httpParamSerializer){ 

    $scope.Signup = function($params){

        $http.defaults.headers.post["Content-Type"] = "application/x-www-form-urlencoded";
        $http.post('http://localhost:8888/vemhamtar/public/signup',$httpParamSerializer({"name":$params.name,"phone":$params.phone,"email":$params.email,"password":$params.password}))
        .success(function(response){

            $params.name = "";
            $params.phone = "";
            $params.email = "";
            $params.password = "";
            $state.go("app.contacts");

        })
        .error(function(error){
            console.log(error);
        });
    };
})

厉害!!非常感谢你!
.controller('SignupCtrl',function($scope,$http,$state,$httpParamSerializer){ 

    $scope.Signup = function($params){

        $http.defaults.headers.post["Content-Type"] = "application/x-www-form-urlencoded";
        $http.post('http://localhost:8888/vemhamtar/public/signup',$httpParamSerializer({"name":$params.name,"phone":$params.phone,"email":$params.email,"password":$params.password}))
        .success(function(response){

            $params.name = "";
            $params.phone = "";
            $params.email = "";
            $params.password = "";
            $state.go("app.contacts");

        })
        .error(function(error){
            console.log(error);
        });
    };
})