-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDatabaseSeeder.php
More file actions
88 lines (74 loc) · 2.57 KB
/
Copy pathDatabaseSeeder.php
File metadata and controls
88 lines (74 loc) · 2.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?php
namespace Database\Seeders;
//use Database\Seeders\{AlbumsTableSeeder,
// AlbumPhotosTableSeeder,
// CompaniesTableSeeder,
// CompanyTypeSeeder,
// EventsTableSeeder,
// GroupsTableSeeder,
// GroupTypeSeeder,
// PermissionTableSeeder,
// PostsTableSeeder,
// PostTypeSeeder,
// ProductsTableSeeder,
// ProductTypeSeeder,
// RoleTableSeeder,
// UsersTableSeeder};
use App\Models\AttributeType;
use App\Models\User;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
//Spatie\Permission\Models\Permission;
class DatabaseSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
User::unguard();
//disable foreign key check for this connection before running seeders
DB::statement('SET FOREIGN_KEY_CHECKS=0;');
app()['cache']->forget('spatie.permission.cache');
// SYSTEM SEEDERS
$this->call(PermissionTableSeeder::class);
$this->call(RoleTableSeeder::class);
$this->call(UsersTableSeeder::class);
$this->call(AccommodationTypeSeeder::class);
$this->call(PostTypeSeeder::class);
$this->call(RoomTypeSeeder::class);
$this->call(CompanyTypeSeeder::class);
$this->call(ProductTypeSeeder::class);
$this->call(AmenitySeeder::class);
$this->call(MembershipSeeder::class);
$this->call(PlanSeeder::class);
$this->call(GroupTypeSeeder::class);
$this->call(AttributeTypeSeeder::class);
$this->call(AttributeSeeder::class);
// $this->call(VenueSeeder::class);
// $this->call(EventsTableSeeder::class);
// $this->call(AccommodationSeeder::class);
// $this->call(RoomSeeder::class);
// $this->call(CompaniesTableSeeder::class);
// $this->call(ProductsTableSeeder::class);
//
// $this->call(GroupsTableSeeder::class);
//
//
// $this->call(DaySeeder::class);
// $this->call(PeriodSeeder::class);
// just for reference
// $this->call(CompanyOpeningHoursSeeder::class);
// $this->call(AlbumsTableSeeder::class);
// $this->call(AlbumPhotosTableSeeder::class);
// $this->call(TagsTableSeeder::class);
// $this->call(RolesAndPermissionsSeeder::class);
// $this->call(CustomersTableSeeder::class);
// supposed to only apply to a single connection and reset it's self
// but I like to explicitly undo what I've done for clarity
DB::statement('SET FOREIGN_KEY_CHECKS=1;');
User::reguard();
}
}