singleloginsystem/app/Services/ConnectedAppService.php
= f90655bc43 refactor: enhance ConnectionStatus handling and remove redundant logo field
- Added `ConnectionStatusData` DTO and `ConnectionStatusService` for managing connection statuses with mapped enums.
- Updated `ConnectedAppFactory` and Livewire `StoreConnectedAppForm` to integrate `ConnectionStatusData` and remove `logoUrl` field.
- Adjusted `ConnectedApp` model to rename columns for consistency.
- Implemented error handling in `ConnectedAppService::create()` for improved resilience.
- Updated Blade templates and composer dependencies for compatibility.
2026-05-14 06:22:40 +00:00

27 lines
500 B
PHP

<?php
declare(strict_types=1);
namespace App\Services;
use App\Data\ConnectedApp\ConnectAppRequest;
use App\Models\ConnectedApp;
use Illuminate\Support\Facades\DB;
use Throwable;
final class ConnectedAppService
{
/**
* Create a new connected app.
* @throws Throwable
*/
public function create(ConnectAppRequest $data): void
{
DB::transaction(
fn () => ConnectedApp::query()->create(
$data->toArray()
)
);
}
}