restore composer.json, add mysqli extension

This commit is contained in:
2026-04-15 17:02:52 +05:00
commit 77cf56a348
4317 changed files with 1397107 additions and 0 deletions

29
app/Rules/Auth/Phone.php Executable file
View File

@@ -0,0 +1,29 @@
<?php
namespace App\Rules\Auth;
use Illuminate\Contracts\Validation\Rule;
class Phone implements Rule
{
/**
* @param string $attribute
* @param mixed $value
*
* @return bool
*/
public function passes($attribute, $value): bool
{
return preg_match('/^\d{12}$/', $value);
}
/**
* Get the validation error message.
*
* @return string
*/
public function message()
{
return 'Телефон номер неправильный';//trans('validation.phone_error');
}
}

32
app/Rules/MatchOldPassword.php Executable file
View File

@@ -0,0 +1,32 @@
<?php
namespace App\Rules;
use Illuminate\Support\Facades\Hash;
use Illuminate\Contracts\Validation\Rule;
class MatchOldPassword implements Rule
{
/**
* Determine if the validation rule passes.
*
* @param string $attribute
* @param mixed $value
* @return bool
*/
public function passes($attribute, $value)
{
return Hash::check($value, auth()->user()->password);
}
/**
* Get the validation error message.
*
* @return string
*/
public function message()
{
return trans('vue.change_password.validate');
}
}