- Introduced `HandlesOperations` trait for reusable error handling with toasts and logging. - Added `StoreConnectionProviderForm` Livewire component with validation and slug uniqueness check. - Implemented `StoreConnectionProviderRequestData` DTO for structured data handling. - Updated `ConnectionProviderService` to include `create()` method using database transactions. - Registered new routes for creating connection providers. - Enhanced `ConnectionProvider` model with `Fillable` attribute for `name` and `slug`.
22 lines
447 B
PHP
22 lines
447 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Data\ConnectedApp;
|
|
|
|
use Spatie\LaravelData\Attributes\MapInputName;
|
|
use Spatie\LaravelData\Data;
|
|
use Spatie\LaravelData\Mappers\SnakeCaseMapper;
|
|
|
|
#[MapInputName(SnakeCaseMapper::class)]
|
|
class StoreConnectionProviderRequestData extends Data
|
|
{
|
|
public string $slug;
|
|
|
|
public function __construct(
|
|
public string $name,
|
|
) {
|
|
$this->slug = str($name)->slug()->toString();
|
|
}
|
|
}
|