I'm just trying to implement a simple validation using Laravel Validator Facade. But it keeps giving me this error below:
Fatal error: Call to undefined method Illuminate\Support\Facades\Validator::make() in C:\xampp\htdocs..\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php on line 221
This is my code below:
use Validator;
/**
* Validate the tenant's credentials
*
* @param array $data
* @return bool
*/
public function validate(array $data)
{
$data = array_only($data, ['email', 'href']);
$validator = Validator::make($data, $this->rules);
if ($validator->passes()) return true;
$this->errors = $validator->messages();
return false;
}
via geebengs