2016-03-28 27 views

回答

3

的錯誤是絕對正確的.. make不在Http類存在,它的存在作爲一個訪問方法關閉Facade類的。

use Illuminate\Support\Facades\Response; 

如果你(出於某種原因)需要這兩個,只是別名。

use Illuminate\Support\Facades\Response as FacadeResponse; 

然後,你可以做$response = FacadeResponse::make($content, 200);

Have a gander at the docs以獲取更多信息。

+0

但是,如何使用laravel文檔(https://laravel.com/docs/4.2 /請求#cookies)使用Response :: make()方法? – Cody

+0

@Cody你是什麼意思?它使用'Illuminate \ Support \ Facades \ Response'。它不使用'Http'類。 [在這裏看看Http類的文檔](https://laravel.com/api/4.2/Illuminate/Http/Response.html)。另外,爲什麼downvote?關於我的回答沒有任何意義。 – Ohgodwhy

相關問題