Support the ongoing development of Laravel.io →
posted 8 years ago
Eloquent
Last updated 1 year ago.
0

you need to crete the relations on migrations first?? can you paste your migrations code??

0

I have made all the databases and relations. I'm not sure what exactly you want to see from my migration? We can take Jeffreys permission/role as example?

    public function up()
    {
        Schema::create('permission_role', function (Blueprint $table) {
            $table->integer('permission_id')->unsigned();
            $table->integer('role_id')->unsigned();
            $table->timestamps();
            $table->foreign('permission_id')->references('id')->on('permission');
            $table->foreign('role_id')->references('id')->on('role');
            $table->primary(['permission_id', 'role_id']);
            $table->engine = 'InnoDB';
        });
    }
0

Sign in to participate in this thread!

Eventy

Your banner here too?

emilmoe emilmoe Joined 23 Oct 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.