user()?->hasRole('Admin') === true; } /** * @return array */ public function rules(): array { return [ 'election_id' => ['required', 'integer', 'exists:elections,id'], 'pusat_mengundi_id' => ['required', 'integer', 'exists:pusat_mengundis,id'], 'allocated_quantity' => ['required', 'integer', 'min:0', 'max:9999'], 'notes' => ['nullable', 'string', 'max:2000'], ]; } }