[ SOLVED ]
Hello again guys,
After reading some articles and watching some videos, I updated the curl code above and it seems like there is nothing special with Laravel about the problem I had. Everything works perfectly now.
Here is new cUrl code sending request :
$fields = http_build_query($_POST);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 3);
$result = curl_exec($ch);
Route code for api :
Route::group(['prefix' => 'api', 'middleware' => 'auth:api'], function() {
Route::any('/v1', ['as' => 'apiV1', 'uses' => '\App\Http\Controllers\Api\ApiV1Controller@index']);
});
Index Method :
public function index(Request $request) {
dd($request->all());
}