SeedCommand   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 6
dl 0
loc 35
c 0
b 0
f 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A handle() 0 4 1
1
<?php
2
3
namespace Turahe\Master\Commands;
4
5
use Illuminate\Console\Command;
6
use Illuminate\Support\Facades\Artisan;
7
8
class SeedCommand extends Command
9
{
10
    /**
11
     * The name and signature of the console command.
12
     *
13
     * @var string
14
     */
15
    protected $signature = 'turahe:master:seed';
16
17
    /**
18
     * The console command description.
19
     *
20
     * @var string
21
     */
22
    protected $description = 'Seed database';
23
24
    /**
25
     * Create a new command instance.
26
     *
27
     * @return void
28
     */
29
    public function __construct()
30
    {
31
        parent::__construct();
32
    }
33
34
    /**
35
     * Execute the console command.
36
     *
37
     * @return mixed
38
     */
39
    public function handle()
40
    {
41
        Artisan::call('db:seed', ['--class' => 'Turahe\Master\Seeds\DatabaseSeeder', '--force' => true]);
42
        $this->info('Seeded: Turahe\Master\Seeds\DatabaseSeeder');
43
    }
44
}
45