rinvex / laravel-contacts
Rinvex Contacts is a polymorphic Laravel package, for contact management system. You can add contacts to any eloquent model with ease.
Installs: 1 817
Dependents: 1
Suggesters: 0
Security: 0
Stars: 31
Watchers: 5
Forks: 14
Open Issues: 0
Requires
- php: ^7.4.0 || ^8.0.0
- illuminate/console: ^8.0.0 || ^9.0.0
- illuminate/database: ^8.0.0 || ^9.0.0
- illuminate/support: ^8.0.0 || ^9.0.0
- jackpopp/geodistance: ^1.2.0
- propaganistas/laravel-phone: ^4.2.0
- rinvex/countries: ^7.0.0
- rinvex/languages: ^5.0.0
- rinvex/laravel-support: ^5.0.0
Requires (Dev)
- codedungeon/phpunit-result-printer: ^0.30.0
- illuminate/container: ^8.0.0 || ^9.0.0
- phpunit/phpunit: ^9.5.0
README
⚠️ This package is abandoned and no longer maintained. No replacement package was suggested. ⚠️
👉 If you are interested to step on as the main maintainer of this package, please reach out to me!
Rinvex Contacts is a polymorphic Laravel package, for contact management system. You can add contacts to any eloquent model with ease.
Installation
-
Install the package via composer:
composer require rinvex/laravel-contacts
-
Publish resources (migrations and config files):
php artisan rinvex:publish:contacts
-
Execute migrations via the following command:
php artisan rinvex:migrate:contacts
-
Done!
Usage
To add contacts support to your eloquent models simply use \Rinvex\Contacts\Traits\HasContacts
trait.
Manage your contacts
// Get instance of your model $user = new \App\Models\User::find(1); // Create a new contact $user->contacts()->create([ 'given_name' => 'Abdelrahman', 'family_name' => 'Omran', 'title' => 'Software Architect', 'organization' => 'Rinvex', 'email' => 'me@omranic.com', 'phone' => '+201228160181', 'source' => 'website', 'method' => 'call', 'country_code' => 'eg', 'language_code' => 'en', 'birthday' => '1987-06-18', 'gender' => 'male', ]); // Create multiple new contacts $user->contacts()->createMany([ [...], [...], [...], ]); // Find an existing contact $contact = app('rinvex.contacts.contact')->find(1); // Update an existing contact $contact->update([ 'email' => 'iOmranic@gmail.com', ]); // Delete contact $contact->delete(); // Alternative way of contact deletion $user->contacts()->where('id', 123)->first()->delete(); // Get relative contacts collection $user->relatives; // Get relative contacts query builder $user->relatives(); // Get back relative contacts collection $user->backRelatives; // Get back relative contacts query builder $user->backRelatives(); // Get attached contacts collection $user->contacts; // Get attached contacts query builder $user->contacts();
Changelog
Refer to the Changelog for a full history of the project.
Support
The following support channels are available at your fingertips:
Contributing & Protocols
Thank you for considering contributing to this project! The contribution guide can be found in CONTRIBUTING.md.
Bug reports, feature requests, and pull requests are very welcome.
Security Vulnerabilities
If you discover a security vulnerability within this project, please send an e-mail to help@rinvex.com. All security vulnerabilities will be promptly contacted.
About Rinvex
Rinvex is a software solutions startup, specialized in integrated enterprise solutions for SMEs established in Alexandria, Egypt since June 2016. We believe that our drive The Value, The Reach, and The Impact is what differentiates us and unleash the endless possibilities of our philosophy through the power of software. We like to call it Innovation At The Speed Of Life. That’s how we do our share of advancing humanity.
License
This software is released under The MIT License (MIT).
(c) 2016-2021 Rinvex LLC, Some rights reserved.