<?php

namespace App\Http\Requests;

use App\IdentitasKlien;
use Gate;
use Illuminate\Foundation\Http\FormRequest;

class MassDestroyIdentitasKlienRequest extends FormRequest
{
    public function authorize()
    {
        return abort_if(Gate::denies('identitas_klien_delete'), 403, '403 Forbidden') ?? true;
    }

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