- Timestamp:
- 10/17/21 18:39:50 (3 years ago)
- Branches:
- develop, master
- Children:
- bd9e8e3
- Parents:
- 120759b
- Location:
- database
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
database/factories/DepartmentFactory.php
r120759b rd795fa6 28 28 return [ 29 29 'id' => $this->faker->unique()->randomNumber(), 30 'name' => $this->faker-> domainName(),30 'name' => $this->faker->name(), 31 31 'code' => $location, 32 32 'location' => 'Departments/' . $location, -
database/factories/UserFactory.php
r120759b rd795fa6 29 29 'password' => $this->faker->password(), 30 30 'email' => $this->faker->email(), 31 ' mobile_number' => $this->faker->phoneNumber(),31 'phone_number' => $this->faker->phoneNumber(), 32 32 'role_id' => $this->faker->numberBetween(1, 2), 33 33 'is_online' => $this->faker->boolean, 34 34 'is_confirmed' => $this->faker->boolean, 35 35 'is_forgot_password' => $this->faker->boolean, 36 'created_by' => "1", 36 37 'created_at' => Carbon::now() 37 38 ]; -
database/migrations/2021_09_27_171107_create_users_table.php
r120759b rd795fa6 22 22 $table->string('password'); 23 23 $table->string('email')->unique(); 24 $table->string(' mobile_number')->unique();24 $table->string('phone_number')->unique(); 25 25 $table->string('avatar')->nullable(); 26 26 $table->integer('role_id')->unsigned(); … … 32 32 $table->integer('security_code')->nullable(); 33 33 $table->string('verify_token')->nullable(); 34 $table->integer("created_by")->unsigned(); 34 35 $table->rememberToken(); 35 36 $table->timestamps(); 37 38 $table->foreign("created_by")->references("id")->on("users")->onDelete("cascade")->onUpdate("cascade"); 36 39 }); 37 40 } -
database/migrations/2021_09_29_121244_create_departments_table.php
r120759b rd795fa6 23 23 24 24 $table->foreign("user_id")->references("id")->on("users")->onDelete("cascade")->onUpdate("cascade"); 25 26 25 }); 27 26 } -
database/seeders/PermissionsTableSeeder.php
r120759b rd795fa6 27 27 ["name" => "delete_all_documents"], // Delete all document/s 28 28 ["name" => "delete_document"], // Delete your document/s 29 ["name" => "manage_file_types"], // Access all file_types to manage 29 30 ]); 30 31 } -
database/seeders/RolesPermissionsTableSeeder.php
r120759b rd795fa6 26 26 ["role_id" => 1, "permission_id" => 9], 27 27 ["role_id" => 1, "permission_id" => 10], 28 ["role_id" => 1, "permission_id" => 11], 28 29 29 30 // Referent … … 36 37 ["role_id" => 2, "permission_id" => 9], 37 38 ["role_id" => 2, "permission_id" => 10], 39 ["role_id" => 2, "permission_id" => 11], 38 40 39 41 // Viewer -
database/seeders/UsersTableSeeder.php
r120759b rd795fa6 22 22 "password" => bcrypt("123456"), 23 23 "email" => "kufliju@gmail.com", 24 " mobile_number" => "+38971201239",24 "phone_number" => "+38971201239", 25 25 "role_id" => 1, 26 26 "is_active" => true, 27 27 "is_confirmed" => true, 28 "created_by" => "1", 28 29 "created_at" => Carbon::now() 29 30 ]);
Note:
See TracChangeset
for help on using the changeset viewer.