<?php

namespace LaraBB\Category\UI\Web\Requests;

use Illuminate\Foundation\Http\FormRequest;
use LaraBB\Application\Traits\Request;

/**
 * Class Edit
 * @package LaraBB\Category\UI\Web\Requests
 */
class Edit extends FormRequest
{
    use Request;

    /**
     * @return bool
     */
    public function authorize(): bool
    {
        return true;
    }

    /**
     * @return array
     */
    public function rules(): array
    {
        return $this->getRules('categories.uuid');
    }

    /**
     * @return array
     */
    public function messages(): array
    {
        return $this->getMessages('categories.uuid');
    }

    /**
     * @param null $keys
     * @return array
     */
    public function all($keys = null): array
    {
        $data         = parent::all($keys);
        $data['uuid'] = $this->route('uuid');

        return $data;
    }
}
