I'm using Laravel 5.5 and jQuery.
I'm trying to return a view after an ajax call but with data and I don't find the solution.
JS:
$('#button-recommandations').on('click', function () {
$.ajax({
method: 'GET',
url : 'recommandationsSeances',
data : {
'idSeance' : $(e.relatedTarget).data('seance')
},
xhrFields: { withCredentials: true },
crossDomain : true
});
});
PHP:
return view('listeRecommandations', [
'recommandationAutresActiviteMemeDateHeure' => $recommandationAutresActiviteMemeDateHeure,
'recommandationsMemeActiviteMemeHeure' => $recommandationsMemeActiviteMemeHeure,
'recommandationsMemeActiviteMemeDate' => $recommandationsMemeActiviteMemeDate
]);
It is possible?
Thank's for help!
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire