{"size": 905, "ext": "js", "max_stars_repo_path": "public/js/car-invoice.js", "max_stars_repo_name": "andjica/Cars-Ruza", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "public/js/car-invoice.js", "max_issues_repo_name": "andjica/Cars-Ruza", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "public/js/car-invoice.js", "max_forks_repo_name": "andjica/Cars-Ruza", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 25.1388888889, "max_line_length": 107, "alphanum_fraction": 0.3745856354}
$(document).ready(function(){

    var id = localStorage.getItem('car');
    var url = $('meta[name="base_url"]').attr('content');

    $.ajax({
        url: url+'/car-invoice',
        method:'GET',
        data:
        {
            id
        },
        success:function(data)
        {
            console.log(data);
            $.post('http://localhost/cars-laravel/public/test', {
                car:data,
                _token: TOKEN
            });

            var text = `
            <tr>
                <td>${id}</td>
                <td>${data['car']}</td>
                <td>${data['motor']['gearshift']},${data['motor']['type']},${data['motor']['benzine']}</td>
                <td>1</td>
                <td> ${data['cost']} &euro;</td>
                <td> ${data['cost']} &euro; </td>
            </tr>
            `;

            $('.car-invoice').html(text);
        }

    })
});