23 lines
653 B
PHP
23 lines
653 B
PHP
<?php
|
|
|
|
namespace App\Domains\Bootstrap\Services;
|
|
|
|
use App\Domains\Tenant\Models\SocialMedia;
|
|
use App\Domains\Tenant\Models\WebsiteType;
|
|
use Illuminate\Database\Eloquent\Collection;
|
|
|
|
class AdminAppBootstrapService
|
|
{
|
|
/** @return array{website_type: WebsiteType, social_media: Collection<int, SocialMedia>} */
|
|
public function get(string $domain): array
|
|
{
|
|
return [
|
|
'website_type' => WebsiteType::query()
|
|
->with(['siteLogo', 'footerLogo'])
|
|
->where('dominio', $domain)
|
|
->firstOrFail(),
|
|
'social_media' => SocialMedia::query()->orderBy('id')->get(),
|
|
];
|
|
}
|
|
}
|