| Total Complexity | 2 | 
| Total Lines | 21 | 
| Duplicated Lines | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 8 | class Seeder  | 
            ||
| 9 | { | 
            ||
| 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 | }  |