How to send data from an Ionic Form to the Laravel 5.5 framework?

1

What kind of friends do I have an error in an application I'm doing? My Front-End is made with IONIC 2 (Angular) and my backend I have in laravel 5.5. It does not give me errors when compiling but when I check the data that is sent from the form to the server it appears that it has been sent empty as you can see in the sentence:

"SQLSTATE [23000]: Integrity constraint violation: 1048 Column 'name' can not be null (SQL: insert into usuarios ( ci , nombre , apellido , telefono , ciudad , calle , postal , correo , usuario , password , foto , updated_at , created_at ) values (, 2017-10-26 21:05:53, 2017-10-26 21:05:53))

Laravel backend driver:

public function store (Request $ request)     {         // User :: create (Request-> all ());         // return "Saved data";

    $usuario=new Usuario;

    $usuario->ci=$request->input('ci');
    $usuario->nombre=$request->input('nombre');
    $usuario->apellido=$request->input('apellido');
    $usuario->telefono=$request->input('telefono');
    $usuario->ciudad=$request->input('ciudad');
    $usuario->calle=$request->input('calle');
    $usuario->postal=$request->input('postal');
    $usuario->correo=$request->input('correo');
    $usuario->usuario=$request->input('usuario');
    $usuario->password=$request->input('password');

    $usuario->foto=$request->input('foto');



    $usuario->save();

    ///decodificar el json recibido 
    $request->json()->all();

I have made the respective changes based on: Problem with Http post Angularjs2

I appreciate your help

    
asked by Byron Alvarez 27.10.2017 в 18:13
source

0 answers