Skip to content

Commit

Permalink
Add allconfigs / overview
Browse files Browse the repository at this point in the history
  • Loading branch information
roberto-butti committed May 22, 2020
1 parent 6e15ed6 commit 2390544
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.1.2 - 2020-05-22

### Add

* Add new argument as input (it is optional):
- overview: you can see configuration, http connection, db connection etc
- allconfigs: you can see verbose configuration from Laravel application. Try to use 'php artisan laralens:diagnostic allconfigs' in your laravel application. You will see the dump of all configuration parameters in json format

## 0.1.1 - 2020-05-22

### Add
Expand Down
29 changes: 26 additions & 3 deletions src/Console/LaraLensCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,18 @@

class LaraLensCommand extends Command
{
protected $signature = 'laralens:diagnostic';
protected $signature = 'laralens:diagnostic
{op=overview : What you want to see, overview or allconfigs}';

protected $description = 'Show some application configruation.';

public function handle()
private function allConfigs()
{
$this->info(json_encode(config()->all(), JSON_PRETTY_PRINT));
}

private function overview()
{
//$this->info("Start");
$ll = new LaraLens();
$output = $ll->getConfigs();
$this->table(["Configs", "Values"], $output->toArray());
Expand All @@ -30,4 +35,22 @@ public function handle()
$this->call('migrate:status');

}
public function handle()
{
$op = $this->argument("op");
switch ($op) {
case 'overview':
$this->overview();
break;
case 'allconfigs':
$this->allConfigs();
break;

default:
$this->info("What you mean? try with 'php artisan laralens:diagnostic --help'");
break;
}
//$this->info("Start");

}
}

0 comments on commit 2390544

Please sign in to comment.