You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
super-gear-directus/app/Repositories/SiteRepository.php

40 lines
812 B

3 years ago
<?php
namespace App\Repositories;
use App\Repositories\RepositoryAbstract;
/**
3 years ago
* request site singleton
3 years ago
*
* @author Björn Hase, Tentakelfabrik
* @license http://opensource.org/licenses/MIT The MIT License
* @link https://gitea.tentakelfabrik.de/Tentakelfabrik/super-gear-directus
*
*/
class SiteRepository extends RepositoryAbstract
{
/** endpoint */
protected $endpoint = 'site';
/**
* find single page with a slug,
* page must be published
*
* @param string $slug
* @return array
*/
public function findOne()
{
return $this->queryBuilder
->fields([
3 years ago
'title',
3 years ago
'description',
'logo'
3 years ago
])
3 years ago
->aliases('logo', 'logo[id]')
3 years ago
->findOne();
}
}