jn-devops/contacts
最新稳定版本:v2.1.41
Composer 安装命令:
composer require jn-devops/contacts
包简介
Homeful Contacts Package
关键字:
README 文档
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.
统计信息
- 总下载量: 4.09k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-06-10