<?php

namespace app\libraries;

trait Json
{
    protected function json_response($data = 'Request has been performed successfully', $httpStatus = 200)
    {
        header_remove();
        header("Content-Type: application/json");
        http_response_code($httpStatus);
        echo json_encode($data);
        exit();
    }
}
