![](/img/trans.png)
[英]Configuring Xdebug debugger on PhpStorm w/ Laravel, Vagrant
[英]Configuring PhpStorm RESTful Client to work with Laravel
我正在嘗試使用PhraStorm和artisan服務器使用Laravel構建RESTful API,但是當我嘗試使用Rest Client進行測試時,我收到此錯誤:
現在我只寫GET方法,並在瀏覽器中收到地址為http://localhost:8000/users
正確輸出
這是我的代碼:
routes.php文件
Route::resource('users','UserController');
UserController.php
public function index()
{
return \Response::json(User::all());
}
我還嘗試在請求窗口中添加json
php artisan serve --host 127.0.0.1
應該做的伎倆。
看起來像PHPStorm在localhost
上查找導致127.0.0.1
。 但php artisan serve
綁定到您的本地IPv6地址::1
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.