Hi There
I am a code beginner and i tested Zend, it was too complex for me and i decided to move to Laravel which i Love for what i have seen.
I manage to have dataTables installed on my project but now i would like to edit the returned data on a modal. on my controller i have the following
$res = User::findOrFail($id);
return View('admin.users.popupedit')
->with('res', $res);
I want that popupedit to be a modal. When i go to the popupedit URL, the data is returned but i dont want that in a diferent window.
in addition to that, i am sending my data to the controller using ajax as follows:
$('#users').on( 'click', 'tr', function (e) {
var t = $(this).closest('tr').find('a').attr('uid');
$( "#dialog-form" ).dialog( "open" );
$.get('/user/' +t +'/edit/', function( data ) {
});
});
So i dont know how to proceed. I dont want to get the data with data function and assign values to my form using: $("#name").val(data.name);
i want to be able to use the data like {{ $res->name }}
Please help