How can I send Json from angle 4 and work them in laravel 5.4

0

In the Front Angular I send it like this

Register(register:RegisterUser){
    return this._http.post(this.url+"auth",
         JSON.stringify(
    {'name':register.name,
    'email':register.email,
    'password':register.password})
        ,{headers:this.headers})
    .map(res=>res.json());

}

and in Laravel I get this: ::

string(17) "lo q trae angular" NULL 

This is the method in laravel

 public function userAuth(Request $request){

            var_dump('lo q trae angular',$request->input('email'));
    
asked by j.dow 28.08.2017 в 20:10
source

1 answer

0

Try to do it without JSON.stringfiy (), that is: -

this.http.post (this.url, register, {headers: this.headers});

    
answered by 29.08.2017 в 23:03