| Conditions | 3 |
| Paths | 4 |
| Total Lines | 28 |
| Code Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 4 | ||
| Bugs | 2 | Features | 1 |
| 1 | <?php |
||
| 30 | public function handle() |
||
| 31 | { |
||
| 32 | $this->info('Starting Installation...'); |
||
| 33 | |||
| 34 | if (! env('APP_KEY')) { |
||
| 35 | $this->info('Generating app key'); |
||
| 36 | Artisan::call('key:generate'); |
||
| 37 | } else { |
||
| 38 | $this->comment('Skipping - App key exists'); |
||
| 39 | } |
||
| 40 | |||
| 41 | $this->info('Migrating database'); |
||
| 42 | Artisan::call('migrate', ['--force' => true]); |
||
| 43 | |||
| 44 | if (! User::count()) { |
||
| 45 | $this->info('Seeding initial data'); |
||
| 46 | Artisan::call('db:seed', ['--force' => true]); |
||
| 47 | } else { |
||
| 48 | $this->comment('Skipping - Data already seeded'); |
||
| 49 | } |
||
| 50 | |||
| 51 | $this->info('Executing npm install and gulp'); |
||
| 52 | system('npm install'); |
||
| 53 | |||
| 54 | $this->comment("\nSuccess! You can now run the application"); |
||
| 55 | $this->comment('Again, for more help refer to'); |
||
| 56 | $this->info('https://github.com/nikhil-pandey/guitar-shop'); |
||
| 57 | } |
||
| 58 | } |
||
| 59 |