you need to crete the relations on migrations first?? can you paste your migrations code??
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';
});
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community