zap/app/Commands/ParseConfigCommand.php

43 lines
989 B
PHP

<?php
namespace App\Commands;
use App\Build\SiteParser;
use App\Models\ContentCollection;
use App\SiteConfiguration;
use Illuminate\Console\Scheduling\Schedule;
use LaravelZero\Framework\Commands\Command;
use Symfony\Component\Yaml\Yaml;
class ParseConfigCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'config';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Command description';
/**
* Execute the console command.
*/
public function handle()
{
// $col = new ContentCollection("projects");
// dd(SiteConfiguration::collections());
foreach ((new SiteParser)->getPages() as $p) {
$this->info($p->key);
$this->warn("- " . $p->entityName);
$this->warn("- " . $p->collection);
$this->warn("- " . $p->layout);
}
}
}