for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace PragmaRX\Firewall\Vendor\Laravel\Artisan;
use Symfony\Component\Console\Helper\Table;
class Report extends Base
{
/**
* The console command name.
*
* @var string
*/
protected $name = 'firewall:list';
* The console command description.
protected $description = 'List all IP address, white and blacklisted.';
* Create a new command instance.
public function __construct()
parent::__construct();
}
* Execute the console command.
* @return mixed
public function fire()
$table = new Table($this->output);
$list = [];
foreach ($this->laravel->firewall->report() as $ip) {
firewall
Illuminate\Contracts\Foundation\Application
instanceof
$list[] = [
$ip['ip_address'],
$ip['whitelisted'] == false
? ''
: ' X ',
? ' X '
: '',
];
$table->setHeaders(['IP Address', 'Whitelist', 'Blacklist'])->setRows($list);
$table->render();