Conditions | 2 |
Paths | 2 |
Total Lines | 19 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
10 | public static function run() |
||
11 | { |
||
12 | $exists = DB::table('cms_privileges')->where('name', 'Super Administrator')->exists(); |
||
13 | if ($exists) { |
||
14 | return; |
||
15 | } |
||
16 | unset($exists); |
||
17 | $pid = DB::table('cms_privileges')->insertGetId([ |
||
18 | 'name' => 'Super Administrator', |
||
19 | 'is_superadmin' => 1, |
||
20 | 'theme_color' => 'skin-red', |
||
21 | ]); |
||
22 | |||
23 | CbUsersRepo::table()->insert([ |
||
24 | 'name' => 'Super Admin', |
||
25 | 'email' => '[email protected]', |
||
26 | 'password' => \Hash::make('123456'), |
||
27 | 'id_cms_privileges' => $pid, |
||
28 | 'status' => 'Active', |
||
29 | ]); |
||
31 | } |