In my blade file, I have 3 div's, with 3 different ID's.
<div id ="id1">0</div>
<div id ="id2">0</div>
<div id ="id3">0</div>
The 0 in each div could be replaced by Time() For ex, which gives the result as 1666111.
If the Routes/web.php looks like this
Route::get('/getTime/{id}', 'App\Http\Controllers\TimeController@getTime');
How to use JQuery Ajax to fetch the time() in the controller and to bind the value to each div's.
Could some one please help? Thanks
time()value in javascript withMath.floor(Date.now()/1000)?http://www.project.test/getTime/id1It should display the same/different time for each div's, So I need AJAX to get the request. @IGPhttp://www.project.test/getTime/id1, It should display thetime()for each div's respectively.