<?php
namespace App\Http\Validators;

use Illuminate\Support\Facades\Validator;

class CompanyValidator{

    public static function validate($data){
        $validator = Validator::make($data, [
            'name'      => 'required|string',
            // 'email'     => 'required|email|unique:companies',
            'address'   => 'required|string',
            'city'      => 'required|string',
            'country'   => 'required|string',
        ]);

        if($validator->fails()){
            return array(
                'status' => false,
                'errors' => $validator->errors()
            );
        }

        return array(
            'status' => true
        );
    }
}
