Completed
Branch master (2f299a)
by Ron
09:20
created

SystemCategoriesSeeder   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 24
c 0
b 0
f 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 17 1
1
<?php
2
3
use Illuminate\Database\Seeder;
4
use App\SystemCategories;
5
6
class SystemCategoriesSeeder extends Seeder
7
{
8
    /**
9
     * Run the database seeds.
10
     *
11
     * @return void
12
     */
13
    public function run()
14
    {
15
        // Test Seeders
16
        $cat1           = new SystemCategories();
17
        $cat1->cat_id   = 1;
1 ignored issue
show
Bug introduced by
The property cat_id does not seem to exist on App\SystemCategories. Are you sure there is no database migration missing?

Checks if undeclared accessed properties appear in database migrations and if the creating migration is correct.

Loading history...
18
        $cat1->name     = 'Phones';
1 ignored issue
show
Bug introduced by
The property name does not seem to exist on App\SystemCategories. Are you sure there is no database migration missing?

Checks if undeclared accessed properties appear in database migrations and if the creating migration is correct.

Loading history...
19
        $cat1->save();
20
        
21
        $cat2           = new SystemCategories();
22
        $cat2->cat_id   = 2;
23
        $cat2->name     = 'Security';
24
        $cat2->save();
25
        
26
        $cat3           = new SystemCategories();
27
        $cat3->cat_id   = 3;
28
        $cat3->name     = 'Bells';
29
        $cat3->save();
30
    }
31
}
32