In ubuntu server I make this test route in api.php
Route::post('/test', function () {
return response()->json(['a' => 'b']);
})->name('test');
When I send post request I get this error
Symfony \ Component \ HttpKernel \ Exception \ MethodNotAllowedHttpException No message
But If I edit api.php to
Route::get('/test', function () {
return response()->json(['a' => 'b']);
})->name('test');
That case if I send post or get method in postman get correct result
{"a":"b"}
This is happen only server. What need to configure?

via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire