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