<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class TriggerRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     */
    public function authorize(): bool
    {
        return true; // Update this if authorization logic is required
    }

    /**
     * Get the validation rules that apply to the request.
     */
    public function rules(): array
    {
        switch($this->method()) {
          case 'POST':
            return [
              'name' => 'required',
            ];
          break;
          case 'PUT':
            return [
              'name' => 'required',
            ];
          break;
          default: 
            return [];
          break;
        }
    }
}
