<?php

namespace App\Classes\Modules\Countries\ControllersLogic;


use App\Classes\General\Abstracts\AbstractControllerLogic;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;

class ListCountriesLogic extends AbstractControllerLogic
{

    /**
     * @return array
     */
    protected function notification():array {
        return [
            'title' => 'Retrieved Countries',
            'message' => 'You have successfully retrieved a list of Countries'
        ];
    }


    /**
     * @param Request $request
     * @return JsonResponse
     */
    public function logic(Request $request) : JsonResponse
    {

        return $this->response(['data' => countries()]);

    }

}