22 lines
434 B
PHP
22 lines
434 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use Symfony\Component\Yaml\Yaml;
|
|
|
|
class SiteConfiguration
|
|
{
|
|
public static function getConfig(): array
|
|
{
|
|
$configPath = base_path('zap.yml');
|
|
return Yaml::parseFile($configPath);
|
|
}
|
|
|
|
public static function collections(): array
|
|
{
|
|
$config = self::getConfig();
|
|
$collections = collect($config['collections'])->keys()->toArray();
|
|
return $collections;
|
|
}
|
|
}
|