1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-15 05:24:04 +00:00

Initial commit

This commit is contained in:
Samuel Štancl 2019-01-17 22:24:12 +01:00
commit deb3ad77f5
19 changed files with 1283 additions and 0 deletions

View file

@ -0,0 +1,45 @@
<?php
namespace Stancl\Tenancy\Commands;
use Illuminate\Console\Command;
class TenantList extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'tenants:list';
/**
* The console command description.
*
* @var string
*/
protected $description = 'List tenants.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$this->info("Listing all tenants.");
tenancy()->all()->each(function ($tenant) {
$this->line("[Tenant] uuid: {$tenant['uuid']} @ {$tenant['domain']}");
});
}
}