wip
This commit is contained in:
parent
562d46cf75
commit
bbd507d9fc
@ -22,8 +22,8 @@ public function create(array $input): User
|
|||||||
Validator::make($input, [
|
Validator::make($input, [
|
||||||
'name' => ['required', 'string', 'max:255'],
|
'name' => ['required', 'string', 'max:255'],
|
||||||
'username' => ['required', 'string', 'max:255', 'unique:users'],
|
'username' => ['required', 'string', 'max:255', 'unique:users'],
|
||||||
'email' => ['required', 'string', 'email', 'max:255'],
|
'email' => ['string', 'email', 'max:255'],
|
||||||
'phone' => ['required', 'regex:/(01)[0-9]{9}/'],
|
'phone' => ['phone:mobile'],
|
||||||
'password' => $this->passwordRules(),
|
'password' => $this->passwordRules(),
|
||||||
'terms' => Jetstream::hasTermsAndPrivacyPolicyFeature() ? ['accepted', 'required'] : '',
|
'terms' => Jetstream::hasTermsAndPrivacyPolicyFeature() ? ['accepted', 'required'] : '',
|
||||||
])->validate();
|
])->validate();
|
||||||
@ -32,7 +32,8 @@ public function create(array $input): User
|
|||||||
'name' => $input['name'],
|
'name' => $input['name'],
|
||||||
'username' => $input['username'],
|
'username' => $input['username'],
|
||||||
'email' => $input['email'],
|
'email' => $input['email'],
|
||||||
'phone' => $input['phone'],
|
//'phone' => $input['phone'],
|
||||||
|
'phone' => phone($input['phone'])->formatE164(),
|
||||||
'password' => Hash::make($input['password']),
|
'password' => Hash::make($input['password']),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,12 @@ class User extends Authenticatable
|
|||||||
*/
|
*/
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'name',
|
'name',
|
||||||
|
'username',
|
||||||
'email',
|
'email',
|
||||||
|
'phone',
|
||||||
|
'role',
|
||||||
|
'site_id',
|
||||||
|
'profile_photo_path',
|
||||||
'password',
|
'password',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
"laravel/sanctum": "^4.0",
|
"laravel/sanctum": "^4.0",
|
||||||
"laravel/tinker": "^2.9",
|
"laravel/tinker": "^2.9",
|
||||||
"livewire/livewire": "^3.0",
|
"livewire/livewire": "^3.0",
|
||||||
|
"propaganistas/laravel-phone": "^5.3",
|
||||||
"spatie/laravel-permission": "^6.10",
|
"spatie/laravel-permission": "^6.10",
|
||||||
"spatie/laravel-settings": "^3.4",
|
"spatie/laravel-settings": "^3.4",
|
||||||
"vinkla/hashids": "^12.0",
|
"vinkla/hashids": "^12.0",
|
||||||
|
156
composer.lock
generated
156
composer.lock
generated
@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "e8349b9d60d088e71a4d4c254ab6c7fe",
|
"content-hash": "365478437927a521db41a974981ba916",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "bacon/bacon-qr-code",
|
"name": "bacon/bacon-qr-code",
|
||||||
@ -730,6 +730,89 @@
|
|||||||
],
|
],
|
||||||
"time": "2023-10-12T05:21:21+00:00"
|
"time": "2023-10-12T05:21:21+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "giggsey/libphonenumber-for-php-lite",
|
||||||
|
"version": "8.13.52",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/giggsey/libphonenumber-for-php-lite.git",
|
||||||
|
"reference": "9d48e4e112d4a24d46a5fb7c65d000ca3d3faac1"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/giggsey/libphonenumber-for-php-lite/zipball/9d48e4e112d4a24d46a5fb7c65d000ca3d3faac1",
|
||||||
|
"reference": "9d48e4e112d4a24d46a5fb7c65d000ca3d3faac1",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": "^8.1",
|
||||||
|
"symfony/polyfill-mbstring": "^1.17"
|
||||||
|
},
|
||||||
|
"conflict": {
|
||||||
|
"giggsey/libphonenumber-for-php": "*"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"ext-dom": "*",
|
||||||
|
"friendsofphp/php-cs-fixer": "^3.12",
|
||||||
|
"infection/infection": "^0.28",
|
||||||
|
"pear/pear-core-minimal": "^1.10.11",
|
||||||
|
"pear/pear_exception": "^1.0.2",
|
||||||
|
"pear/versioncontrol_git": "^0.7",
|
||||||
|
"phing/phing": "^2.17.4",
|
||||||
|
"phpstan/extension-installer": "^1.2",
|
||||||
|
"phpstan/phpstan": "^1.8",
|
||||||
|
"phpstan/phpstan-phpunit": "^1.2",
|
||||||
|
"phpunit/phpunit": "^10.5",
|
||||||
|
"symfony/console": "^6.0",
|
||||||
|
"symfony/var-exporter": "^6.0"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"giggsey/libphonenumber-for-php": "Use libphonenumber-for-php for geocoding, carriers, timezones and matching"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "8.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"libphonenumber\\": "src/"
|
||||||
|
},
|
||||||
|
"exclude-from-classmap": [
|
||||||
|
"/src/data/",
|
||||||
|
"/src/carrier/data/",
|
||||||
|
"/src/geocoding/data/",
|
||||||
|
"/src/timezone/data/"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"Apache-2.0"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Joshua Gigg",
|
||||||
|
"email": "giggsey@gmail.com",
|
||||||
|
"homepage": "https://giggsey.com/"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "A lite version of giggsey/libphonenumber-for-php, which is a PHP Port of Google's libphonenumber",
|
||||||
|
"homepage": "https://github.com/giggsey/libphonenumber-for-php-lite",
|
||||||
|
"keywords": [
|
||||||
|
"geocoding",
|
||||||
|
"geolocation",
|
||||||
|
"libphonenumber",
|
||||||
|
"mobile",
|
||||||
|
"phonenumber",
|
||||||
|
"validation"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/giggsey/libphonenumber-for-php-lite/issues",
|
||||||
|
"source": "https://github.com/giggsey/libphonenumber-for-php-lite"
|
||||||
|
},
|
||||||
|
"time": "2024-12-13T09:11:09+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "graham-campbell/manager",
|
"name": "graham-campbell/manager",
|
||||||
"version": "v5.1.0",
|
"version": "v5.1.0",
|
||||||
@ -3485,6 +3568,77 @@
|
|||||||
},
|
},
|
||||||
"time": "2024-09-05T11:56:40+00:00"
|
"time": "2024-09-05T11:56:40+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "propaganistas/laravel-phone",
|
||||||
|
"version": "5.3.3",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/Propaganistas/Laravel-Phone.git",
|
||||||
|
"reference": "2172362ae5714ddc397d9df96a44b82bd125631a"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/Propaganistas/Laravel-Phone/zipball/2172362ae5714ddc397d9df96a44b82bd125631a",
|
||||||
|
"reference": "2172362ae5714ddc397d9df96a44b82bd125631a",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"giggsey/libphonenumber-for-php-lite": "^8.13.35",
|
||||||
|
"illuminate/contracts": "^10.0|^11.0",
|
||||||
|
"illuminate/support": "^10.0|^11.0",
|
||||||
|
"illuminate/validation": "^10.0|^11.0",
|
||||||
|
"php": "^8.1"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"laravel/pint": "^1.14",
|
||||||
|
"orchestra/testbench": "*",
|
||||||
|
"phpunit/phpunit": "^10.5"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"laravel": {
|
||||||
|
"providers": [
|
||||||
|
"Propaganistas\\LaravelPhone\\PhoneServiceProvider"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"src/helpers.php"
|
||||||
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"Propaganistas\\LaravelPhone\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Propaganistas",
|
||||||
|
"email": "Propaganistas@users.noreply.github.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Adds phone number functionality to Laravel based on Google's libphonenumber API.",
|
||||||
|
"keywords": [
|
||||||
|
"laravel",
|
||||||
|
"libphonenumber",
|
||||||
|
"phone",
|
||||||
|
"validation"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/Propaganistas/Laravel-Phone/issues",
|
||||||
|
"source": "https://github.com/Propaganistas/Laravel-Phone/tree/5.3.3"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/Propaganistas",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2024-12-27T11:45:47+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "psr/cache",
|
"name": "psr/cache",
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
|
@ -22,8 +22,7 @@
|
|||||||
<env name="APP_MAINTENANCE_DRIVER" value="file"/>
|
<env name="APP_MAINTENANCE_DRIVER" value="file"/>
|
||||||
<env name="BCRYPT_ROUNDS" value="4"/>
|
<env name="BCRYPT_ROUNDS" value="4"/>
|
||||||
<env name="CACHE_STORE" value="array"/>
|
<env name="CACHE_STORE" value="array"/>
|
||||||
<!-- <env name="DB_CONNECTION" value="sqlite"/> -->
|
<env name="DB_DATABASE" value="testing"/>
|
||||||
<!-- <env name="DB_DATABASE" value=":memory:"/> -->
|
|
||||||
<env name="MAIL_MAILER" value="array"/>
|
<env name="MAIL_MAILER" value="array"/>
|
||||||
<env name="PULSE_ENABLED" value="false"/>
|
<env name="PULSE_ENABLED" value="false"/>
|
||||||
<env name="QUEUE_CONNECTION" value="sync"/>
|
<env name="QUEUE_CONNECTION" value="sync"/>
|
||||||
|
@ -24,6 +24,11 @@
|
|||||||
<x-input id="email" class="block mt-1 w-full" type="email" name="email" :value="old('email')" required autocomplete="email" />
|
<x-input id="email" class="block mt-1 w-full" type="email" name="email" :value="old('email')" required autocomplete="email" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="mt-4">
|
||||||
|
<x-label for="phone" value="{{ __('Mobile Phone') }}" />
|
||||||
|
<x-input id="phone" class="block mt-1 w-full" name="phone" :value="old('phone')" required autocomplete="phone" />
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<x-label for="password" value="{{ __('Password') }}" />
|
<x-label for="password" value="{{ __('Password') }}" />
|
||||||
<x-input id="password" class="block mt-1 w-full" type="password" name="password" required autocomplete="new-password" />
|
<x-input id="password" class="block mt-1 w-full" type="password" name="password" required autocomplete="new-password" />
|
||||||
|
Loading…
Reference in New Issue
Block a user