19 lines
370 B
PHP
19 lines
370 B
PHP
<?php
|
|
namespace App\Validation;
|
|
use App\Models\Donor_model;
|
|
class UsersRules
|
|
{
|
|
|
|
|
|
public function validateDonor(string $str , string $fields ,array $data)
|
|
{
|
|
$model = new Donor_model();
|
|
$user = $model->where('email',$data['email'])
|
|
->first();
|
|
if(!$Donor)
|
|
return false;
|
|
|
|
return password_verify($data['password'],$user['password']);
|
|
}
|
|
|
|
} |