1
我試圖訪問此路由:http://anaketesting.tk/product-service/payment-notification真的是api的路由,但是消耗路由,具有與瀏覽器相同的錯誤。
我的路線嘗試1:api路由錯誤 - Laravel 5.3
Route::get('/product-service/payment-notification', "[email protected]")->name('productService.notification');
我的路線嘗試2:
Route::get('/product-service/payment-notification', function(){
return \Response::json([
'CREATED' => true
], 201); #also i tryed return 201 directly...
});
我的路線嘗試3:
Route::get('product-service/payment-notification', [
'as' => 'productService.notification',
'uses' => '[email protected]'
]);
我通知Mé的ThOD
public function notification(Request $request){
$date = Carbon::now();
$date = $date->format('Ymdhis');
file_put_contents(storage_path().'/notification_'.$date.'.json', \Response::json($request));
return \Response::json([
'CREATED' => true
], 201);
}
我還沒有使用這種方法的存儲/記錄錯誤,如被忽略。請幫忙;)
另一個路線運行正常* – tesoner
你沒換這條路線(也許是索姆e其他)在一個前綴爲?的路由組中 錯誤說的是什麼? – piotr
不,我沒有,是一個簡單的路線。 {「error」:「出錯了」,「message」:「」} 這是錯誤信息。但是Laravel並沒有寫這條路線的日誌。 – tesoner