So, I have been looking for a solution to make concurrent calls in Laravel 5, but laravel does not process requests concurrently and it waits until the first request finishes than handle the new request. I am posting my controller code
public function getProgess()
{
return response()->json(array('success'=>'1'));
}
public function postGenerate()
{
for ($i=0; $i < 100; $i++) {
sleep(1);
}
}
and routes.php
Route::get('get_progress', 'TestController@getProgess');
Route::get('post_progress', 'TestController@postGenerate');
so what I am doing is following. making get request on post_progress URL and then running the get_progress URL in separate tab to check if it loads or returns but it does not.
Is there anything I am doing wrong ?
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/28TkqWf
via IFTTT
Aucun commentaire:
Enregistrer un commentaire