- Timestamp:
- 10/24/21 20:55:11 (3 years ago)
- Branches:
- develop, master
- Children:
- 7043def
- Parents:
- e0d3f94
- Location:
- database
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
database/factories/FolderFactory.php
re0d3f94 r0df7a93 27 27 public function definition() 28 28 { 29 $array = [5, 15, 25, 35, 45, 55, 65, 75, 85, 95, 105, 115, 125, 135, 145]; 30 31 $deptId = Arr::random($array); 29 $deptId = 1; 32 30 33 31 $deptCode = Department::find($deptId)->code; 32 34 33 $name = $this->faker->unique()->firstName(); 35 34 -
database/seeders/PermissionsTableSeeder.php
re0d3f94 r0df7a93 17 17 { 18 18 \DB::table('permissions')->insert([ 19 ["id" => "1", "name" => " create_user"],// Create new user19 ["id" => "1", "name" => "view_all_users"], // Create new user 20 20 ["id" => "2", "name" => "manage_all_users"], // Access all users to manage 21 21 ["id" => "3", "name" => "manage_all_departments"], // Access all departments to manage … … 27 27 ["id" => "9", "name" => "delete_all_folders"], // Delete all folder/s 28 28 ["id" => "10", "name" => "delete_folder"], // Delete your folder/s 29 ["id" => "11", "name" => "manage_all_files"], // Access all files 30 ["id" => "12", "name" => "manage_file_types"], // Access file types 29 ["id" => "11", "name" => "view_all_files"], // View all files 30 ["id" => "12", "name" => "manage_all_files"], // Access all files 31 ["id" => "13", "name" => "manage_file_types"], // Access file types 32 ["id" => "14", "name" => "edit_user_data"], // Access file types 33 ["id" => "15", "name" => "export_data"], // Access file types 34 ["id" => "16", "name" => "validation_data"] // Access file types 31 35 ]); 32 36 } -
database/seeders/RolesPermissionsTableSeeder.php
re0d3f94 r0df7a93 28 28 ["role_id" => 1, "permission_id" => 11], 29 29 ["role_id" => 1, "permission_id" => 12], 30 ["role_id" => 1, "permission_id" => 13], 31 ["role_id" => 1, "permission_id" => 14], 32 ["role_id" => 1, "permission_id" => 15], 30 33 31 // Referent 34 // Referent 35 ["role_id" => 2, "permission_id" => 1], 32 36 ["role_id" => 2, "permission_id" => 3], 33 37 ["role_id" => 2, "permission_id" => 4], … … 39 43 ["role_id" => 2, "permission_id" => 10], 40 44 ["role_id" => 2, "permission_id" => 11], 45 ["role_id" => 2, "permission_id" => 13], 46 ["role_id" => 2, "permission_id" => 14], 47 ["role_id" => 2, "permission_id" => 15], 41 48 42 49 // Viewer 43 50 ["role_id" => 3, "permission_id" => 5], 44 51 ["role_id" => 3, "permission_id" => 6], 52 ["role_id" => 3, "permission_id" => 11], 45 53 ]); 46 54 } -
database/seeders/UsersTableSeeder.php
re0d3f94 r0df7a93 20 20 "name" => "Berat", 21 21 "surname" => "Kjufliju", 22 "username" => " beratk",22 "username" => "admin", 23 23 "password" => bcrypt("123456"), 24 24 "email" => "kufliju@gmail.com", … … 31 31 ]); 32 32 33 \DB::table("users")->insert([ 34 "id" => "2", 35 "name" => "Berat", 36 "surname" => "Kjufliju", 37 "username" => "referent", 38 "password" => bcrypt("123456"), 39 "email" => "mail@host.com", 40 "phone_number" => "+38971201236", 41 "role_id" => 2, 42 "is_active" => true, 43 "is_confirmed" => true, 44 "created_by" => "1", 45 "created_at" => now() 46 ]); 47 48 \DB::table("users")->insert([ 49 "id" => "3", 50 "name" => "Berat", 51 "surname" => "Kjufliju", 52 "username" => "viewer", 53 "password" => bcrypt("123456"), 54 "email" => "test@test.com", 55 "phone_number" => "+38971201235", 56 "role_id" => 3, 57 "is_active" => true, 58 "is_confirmed" => true, 59 "created_by" => "1", 60 "created_at" => now() 61 ]); 62 33 63 User::factory()->count(50)->create(); 34 64
Note:
See TracChangeset
for help on using the changeset viewer.