<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class TrendingPagesRequest extends FormRequest
{
    public function authorize()
    {
        return true;
    }

    public function rules()
    {
        return [
            'type'        => ['required', 'string'],
            'page_count'  => ['sometimes', 'integer', 'min:1'],
            'days'        => ['sometimes', 'integer', 'min:0'],
            'page_slug'   => ['sometimes', 'string'],
            'filter_type'   => ['sometimes', 'string'],
            'include_slug'  => ['sometimes', 'boolean'],
        ];
    }
}
