laravel5.6在routes/api.php中重定向
Route::middleware('auth:api')->get('/user', function (Request $request) {
return $request->user();
});
Route::any('/he',function(){
return "test api route";
});
Route::any('/bar',function(){
return "test api route_bar";
});
Route::redirect('/he','/bar',301);
laravel5.6重定向报404错误,apache配置allowoverride all已经修改好了 .请问我这个重定向写法对不对?
1 Comment
@chaojilsp#1790 写法应该时没问题的 我用PHP内置服务器(项目根目录下
php artisan serve
启动)测试完全OK