mardi 29 décembre 2015

Where did Laravel get references() method?

I've been stucked for quite an hour now as I am trying to find out where did Laravel 5.2 get the references() method code is shown below

Schema::create('articles', function (Blueprint $table) {
        $table->increments('id');
        $table->unsignedInteger('user_id');
        $table->string('title');
        $table->text('body');
        $table->text('excerpt')->nullable();
        $table->timestamps();
        $table->timestamp('published_at');

        $table->foreign('user_id')->references('id')->on('users');
});

I can't seem to find the references() method in either \Illuminate\Database\Schema\Blueprint or Illuminate\Support\Fluent.

can anyone point me to where is the references() method in the above code can be found?

any help and tips would be great



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire