Index: database/migrations/2014_10_12_000000_create_users_table.php
===================================================================
--- database/migrations/2014_10_12_000000_create_users_table.php	(revision 2fc88eca8e50b236d520d00f243f96eef97ae67f)
+++ 	(revision )
@@ -1,36 +1,0 @@
-<?php
-
-use Illuminate\Database\Migrations\Migration;
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Support\Facades\Schema;
-
-class CreateUsersTable extends Migration
-{
-    /**
-     * Run the migrations.
-     *
-     * @return void
-     */
-    public function up()
-    {
-        Schema::create('users', function (Blueprint $table) {
-            $table->id();
-            $table->string('name');
-            $table->string('email')->unique();
-            $table->timestamp('email_verified_at')->nullable();
-            $table->string('password');
-            $table->rememberToken();
-            $table->timestamps();
-        });
-    }
-
-    /**
-     * Reverse the migrations.
-     *
-     * @return void
-     */
-    public function down()
-    {
-        Schema::dropIfExists('users');
-    }
-}
Index: database/migrations/2014_10_12_100000_create_password_resets_table.php
===================================================================
--- database/migrations/2014_10_12_100000_create_password_resets_table.php	(revision 2fc88eca8e50b236d520d00f243f96eef97ae67f)
+++ 	(revision )
@@ -1,32 +1,0 @@
-<?php
-
-use Illuminate\Database\Migrations\Migration;
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Support\Facades\Schema;
-
-class CreatePasswordResetsTable extends Migration
-{
-    /**
-     * Run the migrations.
-     *
-     * @return void
-     */
-    public function up()
-    {
-        Schema::create('password_resets', function (Blueprint $table) {
-            $table->string('email')->index();
-            $table->string('token');
-            $table->timestamp('created_at')->nullable();
-        });
-    }
-
-    /**
-     * Reverse the migrations.
-     *
-     * @return void
-     */
-    public function down()
-    {
-        Schema::dropIfExists('password_resets');
-    }
-}
Index: database/migrations/2019_08_19_000000_create_failed_jobs_table.php
===================================================================
--- database/migrations/2019_08_19_000000_create_failed_jobs_table.php	(revision 2fc88eca8e50b236d520d00f243f96eef97ae67f)
+++ 	(revision )
@@ -1,36 +1,0 @@
-<?php
-
-use Illuminate\Database\Migrations\Migration;
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Support\Facades\Schema;
-
-class CreateFailedJobsTable extends Migration
-{
-    /**
-     * Run the migrations.
-     *
-     * @return void
-     */
-    public function up()
-    {
-        Schema::create('failed_jobs', function (Blueprint $table) {
-            $table->id();
-            $table->string('uuid')->unique();
-            $table->text('connection');
-            $table->text('queue');
-            $table->longText('payload');
-            $table->longText('exception');
-            $table->timestamp('failed_at')->useCurrent();
-        });
-    }
-
-    /**
-     * Reverse the migrations.
-     *
-     * @return void
-     */
-    public function down()
-    {
-        Schema::dropIfExists('failed_jobs');
-    }
-}
Index: database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php
===================================================================
--- database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php	(revision 2fc88eca8e50b236d520d00f243f96eef97ae67f)
+++ 	(revision )
@@ -1,36 +1,0 @@
-<?php
-
-use Illuminate\Database\Migrations\Migration;
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Support\Facades\Schema;
-
-class CreatePersonalAccessTokensTable extends Migration
-{
-    /**
-     * Run the migrations.
-     *
-     * @return void
-     */
-    public function up()
-    {
-        Schema::create('personal_access_tokens', function (Blueprint $table) {
-            $table->bigIncrements('id');
-            $table->morphs('tokenable');
-            $table->string('name');
-            $table->string('token', 64)->unique();
-            $table->text('abilities')->nullable();
-            $table->timestamp('last_used_at')->nullable();
-            $table->timestamps();
-        });
-    }
-
-    /**
-     * Reverse the migrations.
-     *
-     * @return void
-     */
-    public function down()
-    {
-        Schema::dropIfExists('personal_access_tokens');
-    }
-}
Index: database/migrations/2021_09_27_171104_create_roles_table.php
===================================================================
--- database/migrations/2021_09_27_171104_create_roles_table.php	(revision 582789f8fd3b5f9520ed36b7f2feb0828d4a43af)
+++ database/migrations/2021_09_27_171104_create_roles_table.php	(revision 582789f8fd3b5f9520ed36b7f2feb0828d4a43af)
@@ -0,0 +1,31 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreateRolesTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('roles', function (Blueprint $table) {
+            $table->increments('id');
+            $table->string('name');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('roles');
+    }
+}
Index: database/migrations/2021_09_27_171105_create_permissions_table.php
===================================================================
--- database/migrations/2021_09_27_171105_create_permissions_table.php	(revision 582789f8fd3b5f9520ed36b7f2feb0828d4a43af)
+++ database/migrations/2021_09_27_171105_create_permissions_table.php	(revision 582789f8fd3b5f9520ed36b7f2feb0828d4a43af)
@@ -0,0 +1,31 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreatePermissionsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('permissions', function (Blueprint $table) {
+            $table->increments('id');
+            $table->string("name");
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('permissions');
+    }
+}
Index: database/migrations/2021_09_27_171106_create_roles_permissions_table.php
===================================================================
--- database/migrations/2021_09_27_171106_create_roles_permissions_table.php	(revision 582789f8fd3b5f9520ed36b7f2feb0828d4a43af)
+++ database/migrations/2021_09_27_171106_create_roles_permissions_table.php	(revision 582789f8fd3b5f9520ed36b7f2feb0828d4a43af)
@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreateRolesPermissionsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('roles_permissions', function (Blueprint $table) {
+            $table->integer("role_id")->unsigned();
+            $table->foreign("role_id")->references("id")->on("roles");
+            $table->integer("permission_id")->unsigned();
+            $table->foreign("permission_id")->references("id")->on("permissions");
+            $table->primary(["role_id", "permission_id"]);
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('roles_permissions');
+    }
+}
Index: database/migrations/2021_09_27_171107_create_users_table.php
===================================================================
--- database/migrations/2021_09_27_171107_create_users_table.php	(revision 582789f8fd3b5f9520ed36b7f2feb0828d4a43af)
+++ database/migrations/2021_09_27_171107_create_users_table.php	(revision 582789f8fd3b5f9520ed36b7f2feb0828d4a43af)
@@ -0,0 +1,47 @@
+<?php
+
+use Illuminate\Support\Str;
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreateUsersTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('users', function (Blueprint $table) {
+            $table->increments('id');
+            $table->string('name');
+            $table->string('surname');
+            $table->string('username')->unique();
+            $table->string('password');
+            $table->string('email')->unique();
+            $table->string('mobile_number')->unique();
+            $table->integer('role_id')->unsigned();
+            $table->foreign("role_id")->references("id")->on("roles");
+            $table->boolean('is_active')->default(false);
+            $table->boolean('is_online')->default(false);
+            $table->boolean('is_confirmed')->default(false);
+            $table->boolean('is_forgot_password')->default(false);
+            $table->integer('security_code')->nullable();
+            $table->string('verify_token')->nullable();
+            $table->rememberToken();
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('users');
+    }
+}
Index: database/migrations/2021_09_27_171108_create_password_resets_table.php
===================================================================
--- database/migrations/2021_09_27_171108_create_password_resets_table.php	(revision 582789f8fd3b5f9520ed36b7f2feb0828d4a43af)
+++ database/migrations/2021_09_27_171108_create_password_resets_table.php	(revision 582789f8fd3b5f9520ed36b7f2feb0828d4a43af)
@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreatePasswordResetsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('password_resets', function (Blueprint $table) {
+            $table->string('email')->index();
+            $table->string('token');
+            $table->timestamp('created_at')->nullable();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('password_resets');
+    }
+}
