license: built full stack, test and documentation
Some checks failed
docs / build (push) Has been cancelled
docs / deploy (push) Has been cancelled

This commit is contained in:
Giuseppe Naponiello
2026-07-03 12:47:47 +02:00
parent f8206b5840
commit 271acacb1d
39 changed files with 4078 additions and 57 deletions

View File

@@ -0,0 +1,33 @@
<?php
namespace App\Http\Requests;
use Illuminate\Contracts\Validation\ValidationRule;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class IndexLicenseRequest extends FormRequest
{
/**
* Rotta pubblica: l'elenco delle licenze è informazione pubblica.
*/
public function authorize(): bool
{
return true;
}
/**
* `scope` filtra le select dei form: `record` per artifact/model (solo
* licenze aperte), `media` per i file caricati (tutte). `active` esclude
* le licenze ritirate dagli admin.
*
* @return array<string, ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'scope' => ['nullable', Rule::in(['record', 'media'])],
'active' => ['nullable', 'boolean'],
];
}
}