- Timestamp:
- 09/30/21 00:32:27 (3 years ago)
- Branches:
- develop, master
- Children:
- 24a616f
- Parents:
- 582789f
- Location:
- database
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
database/seeders/DatabaseSeeder.php
r582789f r194a359 18 18 $this->call(RolesPermissionsTableSeeder::class); 19 19 $this->call(UsersTableSeeder::class); 20 $this->call(DepartmentsTableSeeder::class); 20 21 } 21 22 } -
database/seeders/PermissionsTableSeeder.php
r582789f r194a359 4 4 5 5 use Illuminate\Database\Seeder; 6 7 6 8 7 9 class PermissionsTableSeeder extends Seeder … … 14 16 public function run() 15 17 { 16 // 18 \DB::table('permissions')->insert([ 19 ["name" => "create_user"], // Create new user 20 ["name" => "access_all_users"], // Access to all users to manage 21 ["name" => "access_all_departments"], // Access to all departments to manage 22 ]); 17 23 } 18 24 } -
database/seeders/RolesPermissionsTableSeeder.php
r582789f r194a359 14 14 public function run() 15 15 { 16 // 16 \DB::table('roles_permissions')->insert([ 17 // Admin 18 ["role_id" => 1, "permission_id" => 1], 19 ["role_id" => 1, "permission_id" => 2], 20 ["role_id" => 1, "permission_id" => 3], 21 22 // Referent 23 ["role_id" => 2, "permission_id" => 3] 24 ]); 17 25 } 18 26 } -
database/seeders/RolesTableSeeder.php
r582789f r194a359 15 15 { 16 16 \DB::table('roles')->insert([ 17 ["name" => " admin"], // Have access to all users(managing users), departments, documents etc18 ["name" => " referent"], // Have access to all departments, documents etc17 ["name" => "Admin"], // Have access to all users(managing users), departments, documents etc 18 ["name" => "Referent"], // Have access to all departments, documents etc 19 19 ]); 20 20 } -
database/seeders/UsersTableSeeder.php
r582789f r194a359 28 28 ]); 29 29 30 \DB::table("users")->insert([ 31 "name" => "John", 32 "surname" => "Doe", 33 "username" => "john_doe", 34 "password" => bcrypt("Johnsecret1!"), 35 "email" => "johndoe@hotmail.com", 36 "mobile_number" => "+389 71 111 222", 37 "role_id" => 2, 38 "is_active" => true, 39 "is_confirmed" => true, 40 "created_at" => Carbon::now() 41 ]); 42 30 43 //factory(App\Models\User::class, 50)->create(); 31 44 }
Note:
See TracChangeset
for help on using the changeset viewer.