42 lines
803 B
PHP
42 lines
803 B
PHP
<?php
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
use App\CMS\Helpers\CurrentTemplate;
|
|
use Illuminate\Console\Command;
|
|
|
|
class TemplateInfo extends Command
|
|
{
|
|
/**
|
|
* The name and signature of the console command.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $signature = 'template:info';
|
|
/**
|
|
* The console command description.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $description = 'Show details about currently set template';
|
|
|
|
/**
|
|
* Execute the console command.
|
|
*
|
|
* @return mixed
|
|
*/
|
|
public function handle()
|
|
{
|
|
$template = CurrentTemplate::get();
|
|
|
|
if (is_null($template)) {
|
|
$this->error('No template set.');
|
|
|
|
return;
|
|
}
|
|
|
|
$this->line($template->name);
|
|
$this->line($template->handler);
|
|
}
|
|
}
|