jn-devops / contacts
Homeful Contacts Package
Fund package maintenance!
Homeful
Installs: 2 976
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
Requires
- php: ^8.2
- illuminate/contracts: ^10.0||^11.0
- jn-devops/common: ^1.2
- kwn/number-to-words: ^2.9
- lorisleiva/laravel-actions: ^2.8
- spatie/laravel-data: ^4.6
- spatie/laravel-medialibrary: ^11.5
- spatie/laravel-model-status: ^1.18
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^2.9
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^9.0.0||^8.22.0
- pestphp/pest: ^2.34
- pestphp/pest-plugin-arch: ^2.7
- pestphp/pest-plugin-laravel: ^2.3
- phpstan/extension-installer: ^1.3
- phpstan/phpstan-deprecation-rules: ^1.1
- phpstan/phpstan-phpunit: ^1.3
- spatie/laravel-ray: ^1.35
- dev-main
- v2.1.19
- v2.1.18
- v2.1.17
- v2.1.16
- v2.1.15
- v2.1.14
- v2.1.13
- v2.1.12
- v2.1.11
- v2.1.10
- v2.1.9
- v2.1.8
- v2.1.7
- v2.1.6
- v2.1.5
- v2.1.4
- v2.1.3
- v2.1.2
- v2.1.1
- v2.1.0
- v2.0.3
- v2.0.2
- v2.0.1
- v2.0.0
- v1.9.9999
- v1.9.9998
- v1.9.9997
- v1.9.9996
- v1.9.9995
- v1.9.9994
- v1.9.993
- v1.9.992
- v1.9.991
- v1.9.99
- v1.9.98
- v1.9.97
- v1.9.96
- v1.9.95
- v1.9.94
- v1.9.93
- v1.9.92
- v1.9.91
- v1.9.9
- v1.9.8
- v1.9.7
- v1.9.6
- v1.9.5
- v1.9.4
- v1.9.3
- v1.9.2
- v1.9.1
- v1.9.0
- v1.8.9
- v1.8.8
- v1.8.7
- v1.8.6
- v1.8.5
- v1.8.4
- v1.8.3
- v1.8.2
- v1.8.1
- v1.8.0
- v1.7.9
- v1.7.8
- v1.7.7
- v1.7.6
- v1.7.5
- v1.7.3
- v1.7.2
- v1.7.1
- v1.7.0
- v1.6.9
- v1.6.8
- v1.6.7
- v1.6.6
- v1.6.5
- v1.6.4
- v1.6.3
- v1.6.2
- v1.6.1
- v1.6.0
- v1.5.87
- v1.5.86
- v1.5.85
- v1.5.84
- v1.5.83
- v1.5.82
- v1.5.81
- v1.5.80
- v1.5.79
- v1.5.78
- v1.5.77
- v1.5.76
- v1.5.75
- v1.5.74
- v1.5.73
- v1.5.72
- v1.5.71
- v1.5.70
- v1.5.69
- v1.5.68
- v1.5.67
- v1.5.66
- v1.5.65
- v1.5.64
- v1.5.63
- v1.5.62
- v1.5.61
- v1.5.60
- v1.5.59
- v1.5.58
- v1.5.57
- v1.5.56
- v1.5.55
- v1.5.54
- v1.5.53
- v1.5.52
- v1.5.51
- v1.5.50
- v1.5.49
- v1.5.48
- v1.5.47
- v1.5.46
- v1.5.45
- v1.5.44
- v1.5.43
- v1.5.42
- v1.5.41
- v1.5.40
- v1.5.39
- v1.5.38
- v1.5.37
- v1.5.36
- v1.5.35
- v1.5.34
- v1.5.33
- v1.5.32
- v1.5.31
- v1.5.30
- v1.5.29
- v1.5.28
- v1.5.27
- v1.5.26
- v1.5.25
- v1.5.24
- v1.5.23
- v1.5.22
- v1.5.21
- v1.5.20
- v1.5.19
- v1.5.18
- v1.5.17
- v1.5.16
- v1.5.15
- v1.5.14
- v1.5.13
- v1.5.12
- v1.5.11
- v1.5.10
- v1.5.9
- v1.5.8
- v1.5.7
- v1.5.6
- v1.5.5
- v1.5.4
- v1.5.3
- v1.5.2
- v1.5.1
- v1.5.0
- v1.4.27
- v1.4.26
- v1.4.25
- v1.4.24
- v1.4.23
- v1.4.22
- v1.4.21
- v1.4.20
- v1.4.19
- v1.4.18
- v1.4.17
- v1.4.16
- v1.4.15
- v1.4.14
- v1.4.13
- v1.4.12
- v1.4.11
- v1.4.10
- v1.4.9
- v1.4.8
- 1.4.7
- v1.4.6
- v1.4.4
- v1.4.3
- v1.4.2
- v1.4.1
- v1.4.0
- v1.3.1
- v1.3.0
- v1.2.6
- v1.2.1
- v1.2.0
- v1.1.0
- v1.0.1
- v1.0.0
- dev-staging
- dev-dev
This package is auto-updated.
Last update: 2025-03-27 09:32:05 UTC
README
Description
The Homeful Contacts Package is a comprehensive solution for managing customer and borrower contact details, including personal information, employment data, addresses, and uploaded documents. It features advanced metadata handling to ensure structured and reliable contact management.
Key Features:
- Customer & Contact Models: Supports customer and borrower contact details.
- Contact Metadata: Provides structured metadata for employment, addresses, and uploaded documents.
- Media Handling: Supports various document types such as IDs, contracts, invoices, and receipts.
- Integration with Borrower Interface: Ensures seamless connection with the borrowing system.
- Phone Number Validation: Uses Laravel Phone for formatted phone number management.
Installation
Install via Composer:
composer require jn-devops/contacts
Usage
🔹 Creating a Contact
use Homeful\Contacts\Models\Contact; $contact = Contact::create([ 'first_name' => 'Juan', 'last_name' => 'Dela Cruz', 'email' => 'juan.delacruz@example.com', 'mobile' => '09171234567', 'date_of_birth' => '1990-05-15', ]);
🔹 Creating a Customer
use Homeful\Contacts\Models\Customer; $customer = Customer::create([ 'first_name' => 'Maria', 'last_name' => 'Santos', 'email' => 'maria.santos@example.com', 'mobile' => '09181234567', ]);
🔹 Associating Employment Details
$customer->employment = [ [ 'type' => 'Primary', 'monthly_gross_income' => 50000, 'employment_status' => 'Regular', 'employer' => [ "name" => "Tech Solutions Inc.", "email" => "hr@techsolutions.com", "address" => [ "type" => "Primary", "region" => "NCR", "country" => "PH", "address1" => "123 Makati Avenue, Makati City", "postal_code" => "1200" ], "industry" => "Technology", ] ] ]; $customer->save();
🔹 Handling Uploaded Documents
$customer->addMediaFromUrl('https://example.com/uploads/id_image.jpg')->toMediaCollection('id-images'); $customer->addMediaFromUrl('https://example.com/uploads/contract.pdf')->toMediaCollection('contract-documents');
🔹 Retrieving Contact Metadata
use Homeful\Contacts\Classes\ContactMetaData; $contactMetadata = ContactMetaData::from($customer->toArray());
Testing
Run tests using:
composer test
Author
- Lester B. Hurtado
Email: devops@joy-nostalg.com
GitHub: jn-devops
License
This package is open-source software licensed under the MIT License. See the License File for details.