mercredi 30 mars 2016

How to make ajax call in Laravel 5.1 [duplicate]

This question already has an answer here:

I have following function

function events(){
    var data = $.ajax({
        url: 'http://ift.tt/1pKm16S',
        type: 'GET'
    });

    alert(data);
}

then in my routes I have

Route::group(['prefix'=>'api/v1/'],function(){
    Route::resource('events','EventsapiController');
});

if you just put following url then it shows the json data

http://ift.tt/1pKm16S

but when I access it on my laravel using the ajax call its showing null object

Any idea



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire