<?php

namespace Mehrab\Common\Responses;

use Illuminate\Http\Response;

class AjaxResponses
{
    public static function SuccessResponse(){
        return response()->json(['با موفقیت انجام شد'],Response::HTTP_OK);
    }

    public static function FailedResponse($message = 'با خطا مواجه شد' ){
        return response()->json([$message],Response::HTTP_INTERNAL_SERVER_ERROR);
    }

    public static function SuccessResponseData($data){
        return response()->json($data,Response::HTTP_OK);
    }
}
