mercredi 4 avril 2018

Migration:Reference method is not found in subject class

>  Schema::create('password_resets', function (Blueprint $table) {
>  $table->string('email')**->index();**
>  $table->string('token');
>  $table->timestamp('created_at')**->nullable();**

In migration file php storm is saying that the

Method 'index' not found in Illuminate\Support\Fluent and Referenced method is not found in subject clas.

In any migration fail i can't chain like:

 Schema::table('posts', function (Blueprint $table) {           
       $table->unsignedInteger('user_id');        
       $table->foreign('user_id')->references('id')->on('users');
 }



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire