Q:

PHP Showing wrong name value

I am using x-editable as my edit in place library.
My issue is that when I go to insert my data and run it via my controller its showing the wrong value when I var_dump the PHP.
The row I am inserting is
<input class="form-control updateField" data-url="{{ route('socialDataSubmit', 1)}}" data-title="Facebook" name="facebook" placeholder="Facebook" type="input"  value="{{ old('facebook', @$siteSocialSettingsData->facebook)}}"> <span class="input-group-btn"><button class="btn btn-default edit" type="button"><span class="glyphicon glyphicon glyphicon-pencil"></span></button></span>

As you see in my jQuery I have console.log this is showing the correct value that should be inserted into the database.  However when I get to the  PHP I am getting a "name" from another tab (using bootstrap tabs) input field why?
Input name thats being inserted:
  <input class="form-control updateField" data-url="{{ route('generalDataSubmit', 1)}}" data-title="Website Name" name="siteName" placeholder="Email" type="input" value="{{ old('siteName', $siteSettingsData->siteName)}}"> <span class="input-group-btn"><button class="btn btn-default edit" type="button"><span class="glyphicon glyphicon glyphicon-pencil"></span></button></span>

Controllers:
public function generalSettingsGeneralSubmit(Request $request, $id)
    {
        $dbUpdate                = generalSettings::find($id);
        $dbColumnName            = Request::input('name');
        $dbColumnValue           = Request::input('value');

        $dbUpdate->$dbColumnName = $dbColumnValue;
        $dbUpdate->save();

    }

    public function generalSettingsSocialSubmit(Request $request, $id)
    {

        $social = socialSettings::where('id','=',$id)->first();

        if(is_null($social))
        {
           $socialInsert = new socialSettings;

           $socialInsert->socialName  = Request::input('name');
           $socialInsert->socialLink  = Request::input('value'); 
           $socialInsert->save();
        }else{
           var_dump(Request::input('name'));
           var_dump(Request::input('value')); 
           die(); 
        }
    }

jQuery:
$(function(){

$.fn.editable.defaults.mode = 'inline';

$.fn.editable.defaults.params = function (params) {
    params._token = $("#_token").data("token");
    return params;
};
   var dataURL   = $('.updateField').data('url');
   var inputName = $('.updateField').attr("name");

$('.updateField').editable({
    type: 'text',
    url: dataURL,    
    name: inputName,    
    placement: 'top',
    title: 'Enter public name',
    toggle:'manual',
    send:'always',
    ajaxOptions:{
      dataType: 'json'
    }    
});

$('.edit').click(function(e){ 
    var container = $(this).closest('.input-group'); // !!
    var input     = container.find('.updateField');
    var inputName = input.attr('name');
    var dataURL   = input.data('url');

      console.log(inputName);  
       e.stopPropagation();
       container.find('.updateField').editable('toggle'); // !!
       container.find('.edit').hide(); // !!
});
    $(document).on('click', '.editable-cancel, .editable-submit', function(e){
        $(e.target).closest('.input-group').find('.edit').show(); // !!
    })             
//ajax emulation. Type "err" to see error message
$.mockjax({
    url: '/post',
    responseTime: 100,
    response: function(settings) {
        if(settings.data.value == 'err') {
           this.status = 500;  
           this.responseText = 'Validation error!'; 
        } else {
           this.responseText = '';  
        }
    }
}); 

});

A:

@Jess, I see an issue that can be causing the problem:
the console.log content is based on:
var container = $(this).closest('.input-group'); // !!
var input     = container.find('.updateField');
var inputName = input.attr('name');

the code is getting the "this" content, followed by the .closest() function wich get the first element that matches your condition;
but, on the variable that you are sending to PHP:
var dataURL   = $('.updateField').data('url');
var inputName = $('.updateField').attr("name");

It is getting the content from the '.updatedField', and it starts getting from the beggining of the document.
My guess is, try to put an unique ID to this input and check if it works. something like:
<input id="test-id-sample" class="form-control updateField"
...
var inputName = $('#test-id-sample .updateField').attr("name");

