| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | public function handle(ClientRepository $client) |
||
| 32 | { |
||
| 33 | $this->call('passport:keys', ['--force' => $this->option('force'), '--length' => $this->option('length')]); |
||
| 34 | if( ! \Core::oauthCLients()->first(['password_client' => 1])->count()) { |
||
| 35 | |||
| 36 | $client = $client->createPasswordGrantClient( |
||
| 37 | null, config('app.name'), 'http://localhost' |
||
| 38 | ); |
||
| 39 | \DotenvEditor::setKey('PASSWORD_CLIENT_ID', $client->id); |
||
| 40 | \DotenvEditor::setKey('PASSWORD_CLIENT_SECRET', $client->secret); |
||
| 41 | \DotenvEditor::save(); |
||
| 42 | } |
||
| 43 | } |
||
| 44 | } |
||
| 45 |