<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

/** Pazarlama sitesindeki herkese açık online başvuru formu. */
class StoreApplicationRequest extends FormRequest
{
    public function authorize(): bool
    {
        return true;
    }

    public function rules(): array
    {
        return [
            'name' => ['required', 'string', 'max:255'],
            'phone' => ['required', 'string', 'max:20'],
            'email' => ['nullable', 'email'],
            'address' => ['nullable', 'string'],
            'il' => ['required', 'string', 'max:100'],
            'ilce' => ['required', 'string', 'max:100'],
            'package_id' => ['required', 'exists:packages,id'],
        ];
    }
}
