develop
Last change
on this file since 2740efc was 7304c7f, checked in by beratkjufliju <kufliju@…>, 3 years ago |
added user authentication, create & forgot password methods and blades
|
-
Property mode
set to
100644
|
File size:
872 bytes
|
Rev | Line | |
---|
[7304c7f] | 1 | <?php
|
---|
| 2 |
|
---|
| 3 | use Illuminate\Support\Facades\Schema;
|
---|
| 4 | use Illuminate\Database\Schema\Blueprint;
|
---|
| 5 | use Illuminate\Database\Migrations\Migration;
|
---|
| 6 |
|
---|
| 7 | class CreateRolesPermissionsTable extends Migration
|
---|
| 8 | {
|
---|
| 9 | /**
|
---|
| 10 | * Run the migrations.
|
---|
| 11 | *
|
---|
| 12 | * @return void
|
---|
| 13 | */
|
---|
| 14 | public function up()
|
---|
| 15 | {
|
---|
| 16 | Schema::create('roles_permissions', function (Blueprint $table) {
|
---|
| 17 | $table->integer("role_id")->unsigned();
|
---|
| 18 | $table->foreign("role_id")->references("id")->on("roles");
|
---|
| 19 | $table->integer("permission_id")->unsigned();
|
---|
| 20 | $table->foreign("permission_id")->references("id")->on("permissions");
|
---|
| 21 | $table->primary(["role_id", "permission_id"]);
|
---|
| 22 | });
|
---|
| 23 | }
|
---|
| 24 |
|
---|
| 25 | /**
|
---|
| 26 | * Reverse the migrations.
|
---|
| 27 | *
|
---|
| 28 | * @return void
|
---|
| 29 | */
|
---|
| 30 | public function down()
|
---|
| 31 | {
|
---|
| 32 | Schema::dropIfExists('roles_permissions');
|
---|
| 33 | }
|
---|
| 34 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.