Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
18 | public function up() |
||
19 | { |
||
20 | Schema::create('role_permission', function (Blueprint $table) { |
||
21 | $table->unsignedInteger('role_id'); |
||
22 | $table->unsignedInteger('permission_id'); |
||
23 | $table->timestamps(); |
||
24 | $table->unique(['permission_id','role_id']); |
||
25 | $table->foreign('role_id')->references('id')->on('roles')->onDelete('cascade'); |
||
26 | $table->foreign('permission_id')->references('id')->on('permissions')->onDelete('cascade'); |
||
27 | }); |
||
28 | } |
||
29 | |||
39 |