update controllers logic
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Admin;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
/** Validation for creating a competition (CodeIgniter `CompetitionWinnersController::store`). */
|
||||
class StoreCompetitionWinnerRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'title' => ['required', 'string', 'min:3'],
|
||||
'class_section_id' => ['nullable', 'integer'],
|
||||
'semester' => ['nullable', 'string'],
|
||||
'school_year' => ['nullable', 'string'],
|
||||
'start_date' => ['nullable', 'date'],
|
||||
'end_date' => ['nullable', 'date'],
|
||||
'winner_overrides' => ['sometimes', 'array'],
|
||||
'question_counts' => ['sometimes', 'array'],
|
||||
'prizes' => ['sometimes', 'array'],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user