app/Http/Controllers/ClienteController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(Request $request)
    {
        if(!$request->ajax()) return \redirect('/');
        $persona = new Persona();
        $persona->nombre =$request->nombre;
        $persona->tipo_documento =$request->tipo_documento;
        $persona->num_documento =$request->num_documento;
        $persona->direccion =$request->direccion;
        $persona->telefono =$request->telefono;
        $persona->email =$request->email;
        $persona->save();
    }
public function store ( Request $ request ) { if ( ! $ request -> ajax ( ) ) return \ redirect ( '/' ) ; $ persona = new Persona ( ) ; $ persona -> nombre = $ request -> nombre ; $ persona -> tipo_documento = $ request -> tipo_documento ; $ persona -> num_documento = $ request -> num_documento ; $ persona -> direccion = $ request -> direccion ; $ persona -> telefono = $ request -> telefono ; $ persona -> email = $ request -> email ; $ persona -> save ( ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .