如何解决无法设置未定义的属性“ X-CSRF-TOKEN”
我正在尝试创建api文档。但是当我尝试检查工作时,它给出了Could not render n,see the console.
,而在控制台上它给出了Cannot set property 'X-CSRF-TOKEN' of undefined
。
我在“测试控制器”中的代码是
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class TestingController extends Controller
{
/**
* @SWG\Get(
* path="/api/testing/{mytest}",* summary="Get Testing",* operationId="testing",* @SWG\Response(response=200,description="successful operation"),* @SWG\Response(response=406,description="not acceptable"),* @SWG\Response(response=500,description="internal server error"),* @SWG\Parameter(
* name="mytest",* in="path",* required=true,* type="string"
* ),* )
*
*/
public function index(Request $request){
echo $request->mytest;
}
}
路线是
Route::get('/testing/{mytest}','TestingController@index');
如果我可以解决的话,对我有很大的帮助。谢谢。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。