Answer the question
In order to leave comments, you need to log in
How to pass an arbitrary get parameter to an Ajax request?
$(document).ready(function(){
// При нажатии на кнопку id=send
$('#remember').click(function(){
$.get('true_advert',{remember:""});
});
});
protected function remember_adverts(Request $request)
{
if ($request->input('remember'))
{
$id_advert = $_GET['remember'];
$client = Auth::user()->id;
Adverts::remember_adverts($client,$id_advert);
}
}
<button type="submit" value="{{$advert->id_realty}}" name="remember" id="remember">Запомнить</button>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question