I have to ask something again. Here is my java script code
<script>
$('#spiele').on('change', function(e){
console.log(e);
var spielID = e.target.value;
//ajax
$.get('/spieler-table?spielID=' + spielID, function(data){
//success data
console.log(data);
});
});
</script>
Everything works fine. But in my route web there I getting an error.
jquery-3.2.1.min.js:4 GET http://localhost:8000/spieler-table?spielID=3 500 (Internal Server Error)
Here it is...
Route::get('/spieler-table', function(){
$testvar = Input::get('spielID');
echo $testvar;
});
I think it is because of the var spielID which comes from my javascript code. Because the i get into the Route get and the php echo works fine with an easy string output. But when I try to Input the spielID into tester. I getting the error. Im using the laravel framework