feat: Refactor bootstrap functionality by adding AdminApp and Tenant controllers, requests, resources, and services; remove deprecated event form components
This commit is contained in:
22
app/Domains/Bootstrap/Services/AdminAppBootstrapService.php
Normal file
22
app/Domains/Bootstrap/Services/AdminAppBootstrapService.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?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(),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user