<?php
namespace App\Services\Response;

use Illuminate\Http\Exceptions\HttpResponseException;

/**
 * Class based Helper to upload and resize Images
 */
class ResponseService
{

    public static function successResponse($message,$responseData,$status)
    {
        return response()->json
        (
            [
                'message'=>$message,
                'data'=>$responseData
            ]
            ,$status
        );
    }

    public static function failedResponse($errors)
    {
        throw new HttpResponseException(response()->json(['errors' => $errors], 422));
    }

}


