- Removed the old `connected-apps.create` implementation and components, simplifying the codebase. - Introduced modular OIDC integration using reusable components and traits, such as `WithSearchableChoices` and `WithRepeaterFields`. - Added `StoreOIDCAppForm` for handling OpenID Connect app-specific fields and validation. - Updated `choices.blade.php` and related components to leverage configuration-driven, dynamic multi-select functionality. - Updated routes to support new OIDC app creation under distinct connection protocol namespaces. - Enhanced app creation flow with support for dynamic fields like URIs (`repeater-input`) and scoped user roles.
23 lines
537 B
PHP
23 lines
537 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Livewire\Concerns;
|
|
|
|
trait WithRepeaterFields
|
|
{
|
|
public function addRepeaterItem(string $property, mixed $default = ''): void
|
|
{
|
|
$items = data_get($this, $property, []);
|
|
$items[] = $default;
|
|
data_set($this, $property, $items);
|
|
}
|
|
|
|
public function removeRepeaterItem(string $property, int $index): void
|
|
{
|
|
$items = data_get($this, $property, []);
|
|
unset($items[$index]);
|
|
data_set($this, $property, array_values($items));
|
|
}
|
|
}
|