app/Http/Controllers/PersonaController.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()){
            Persona::create($request->all());
            return response()->json(['mensaje'=>$request->all()]);
        }
    }
public function store ( Request $ request ) { if ( $ request -> ajax ( ) ) { Persona :: create ( $ request -> all ( ) ) ; return response ( ) -> json ( [ 'mensaje' => $ request -> all ( ) ] ) ; } }
Store a newly created resource in storage.
Store a newly created resource in storage .