mirror of
https://github.com/koel/koel
synced 2024-11-14 00:17:13 +00:00
19 lines
363 B
PHP
19 lines
363 B
PHP
<?php
|
|
|
|
namespace App\Repositories;
|
|
|
|
use App\Models\Setting;
|
|
|
|
class SettingRepository extends Repository
|
|
{
|
|
/** @return array<mixed> */
|
|
public function getAllAsKeyValueArray(): array
|
|
{
|
|
return $this->model->pluck('value', 'key')->toArray();
|
|
}
|
|
|
|
public function getByKey(string $key): mixed
|
|
{
|
|
return Setting::get($key);
|
|
}
|
|
}
|