0
我有一個相當簡單的遷移產生以下錯誤:Laravel遷移錯誤,動物內臟()未定義
[Symfony\Component\Debug\Exception\FatalErrorException]
Call to undefined method Illuminate\Support\Collection::pluck()
我可以回滾,但我不能遷移了。我使用"laravel/framework": "5.1.*@dev",
,這是遷移:
public function up()
{
Schema::table('tutorials', function (Blueprint $table) {
$table->string('url');
$table->string('title');
$table->text('description');
$table->string('image');
});
}
的pluck
方法在Illuminate\Support\Collection
定義,所以我在虧損還算是的。我也運行了composer dump
。有任何想法嗎?
您正在使用'@ dev'分支,因此可能有一些事情需要修復......爲什麼不嘗試穩定版本'v5.1.4'? – kishanterry
http://laravel.com/docs/5.1/upgrade#upgrade-5.1.0報價:以下Laravel功能已被棄用,並將在2015年12月發佈Laravel 5.2時完全刪除:(...)The Eloquent和查詢生成器'pluck'方法已被棄用並重命名爲'value'。 (...)集合'fetch'方法已被棄用,以支持'pluck'方法。 (...)也許你看到了這個的實現? –