小编Yae*_*kay的帖子

Phpstorm 9 EAP方法"独特"在类Illuminate\Support\Fluent中找不到

我正在开发一个网站项目,我正在使用Laravel 5和PHPStorm 9 EAP.

我创建了一个迁移并使用此代码$table->string('name')->unique();,IDE突出显示unique()并显示一条消息Method "unique" not found in class Illuminate\Support\Fluent.

这是我的迁移:

class CreateProductsTable extends Migration {

/**
 * Run the migrations.
 *
 * @return void
 */
public function up()
{
    Schema::create('products', function(Blueprint $table)
    {
        $table->increments('id');
        $table->string('name')->unique();
        $table->timestamps();
    });
}

/**
 * Reverse the migrations.
 *
 * @return void
 */
public function down()
{
    Schema::drop('products');
}

}
Run Code Online (Sandbox Code Playgroud)

我该如何解决这个问题?

php phpstorm laravel-5

4
推荐指数
2
解决办法
3537
查看次数

标签 统计

laravel-5 ×1

php ×1

phpstorm ×1