<?php

namespace App\Http\Requests;

use App\Models\FusionType;
use Gate;
use Illuminate\Foundation\Http\FormRequest;
use Symfony\Component\HttpFoundation\Response;

class MassDestroyFusionTypeRequest extends FormRequest
{
    public function authorize()
    {
        abort_if(Gate::denies('fusion_type_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden');

        return true;
    }

    public function rules()
    {
        return [
            'ids'   => 'required|array',
            'ids.*' => 'exists:fusion_types,id',
        ];
    }
}
