<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class BannerAdRequest extends FormRequest
{
    // Authorize the request
    public function authorize()
    {
        return true; // Allow all users to make this request
    }

    // Define the validation rules
    public function rules()
    {
        return [
            'image' => 'nullable|image|mimes:jpeg,png,jpg,gif|max:2048', // Image is optional and must be valid
            'title' => 'nullable|string|max:255', // Title is optional, must be a string, max length 255
            'description' => 'nullable|string|max:1000', // Description is optional, max length 1000
            'status' => 'nullable|in:active,inactive', // Status can be either 'active' or 'inactive'
        ];
    }
}
