Some checks failed
Create Docker Image / Build Docker Image (arm64) (push) Has been cancelled
Create Docker Image / Build Docker Image (x86_64) (push) Has been cancelled
Create Docker Image / Final Docker Image Manifest (push) Has been cancelled
Create Docker Image / Test Application (x86_64) (push) Has been cancelled
26 lines
512 B
PHP
26 lines
512 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class EntryRequest extends FormRequest
|
|
{
|
|
/**
|
|
* Get the validation rules that apply to the request.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function rules(): array
|
|
{
|
|
$r = request() ?: collect();
|
|
|
|
return config('server')
|
|
->schema('attributetypes')
|
|
->intersectByKeys($r->all())
|
|
->map(fn($item)=>$item->validation($r->get('objectclass',[])))
|
|
->filter()
|
|
->flatMap(fn($item)=>$item)
|
|
->toArray();
|
|
}
|
|
} |