<?php

namespace App\Http\Requests;

use App\Models\FusionCategory;
use Gate;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Http\Response;

class UpdateFusionCategoryRequest extends FormRequest
{
    public function authorize()
    {
        return Gate::allows('fusion_category_edit');
    }

    public function rules()
    {
        return [
            'fusion_categories' => [
                'string',
                'required',
                'unique:fusion_categories,fusion_categories,' . request()->route('fusion_category')->id,
            ],
        ];
    }
}
