<?php

namespace App\Libraries;

class ResponseFormatter
{
    public static function success($data = null, $message = 'success')
    {
        return [
            'status' => true,
            'message' => $message,
            'data' => $data
        ];
    }

    public static function error($message = 'error', $code = 400)
    {
        return [
            'status' => false,
            'message' => $message,
            'data' => null
        ];
    }
}