<?php

namespace App\Libraries;
use Validator;

class Validation
{
    public static function validatePayload($payload,$rules)
    {
        $validator = Validator::make($payload, $rules);
        return $validator->fails() ? ['status' => false,'message' => $validator->errors()->first()] : ['status' => true];

    }
}
