mirror of
https://github.com/zeropingheroes/lancache-autofill
synced 2024-11-25 17:10:16 +00:00
Tabulating app search results
This commit is contained in:
parent
e57342dd3b
commit
f6f9082a65
1 changed files with 8 additions and 1 deletions
|
@ -4,6 +4,8 @@ namespace Zeropingheroes\LancacheAutofill\Commands\Steam;
|
|||
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Database\Capsule\Manager as Capsule;
|
||||
use Symfony\Component\Console\Helper\Table;
|
||||
|
||||
|
||||
class SearchApps extends Command
|
||||
{
|
||||
|
@ -32,8 +34,13 @@ class SearchApps extends Command
|
|||
->where('name', 'like', '%'.$this->argument('name').'%')
|
||||
->get();
|
||||
|
||||
$table = new Table($this->output);
|
||||
$table->setHeaders(['App ID', 'Name']);
|
||||
|
||||
foreach ($apps as $app) {
|
||||
$this->info($app->id."\t".$app->name);
|
||||
$table->addRow([$app->id, $app->name]);
|
||||
}
|
||||
|
||||
$table->render();
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue