<?php

namespace App\Http\Controllers\PermitsReminder;

use App\Models\PermitsReminder;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;

class DeletePermitsReminderController
{
    /**
     * @param Request $request
     * @return JsonResponse
     */
    public function delete(Request $request): JsonResponse
    {
        $record = PermitsReminder::find($request->route('id'));
        $record->delete();

        $response = [
            "title" => "Delete Permits Reminder Successful",
            "message" => "You have successfully deleted a Permits Reminder",
            "payload" => []
        ];

        return response()->json($response);
    }
}
