source: database/migrations/2021_09_27_171106_create_roles_permissions_table.php

Last change on this file 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
Line 
1<?php
2
3use Illuminate\Support\Facades\Schema;
4use Illuminate\Database\Schema\Blueprint;
5use Illuminate\Database\Migrations\Migration;
6
7class 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.