Download the PHP package tadasei/laravel-contacts without Composer
On this page you can find all versions of the php package tadasei/laravel-contacts. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-contacts
Tadasei/laravel-contacts
This package provides stubs for contacts association (with various contact methods) to Eloquent models.
Features
- Quickly generate contacts migrations, models, factories and enums.
- Customize and extend generated code to fit your project's needs.
- Improve development efficiency by eliminating repetitive tasks.
Installation
You can install the package via Composer by running:
Publishing contacts handling utilities
To publish contacts handling utilities, use the following command:
Configuring The Country Model
This package references an App\Models\Country model and requires manual supply of its implementation to add phone code support through a phone_code attribute for the following contact method types:
landlinemobilefax
To use a different model, edit App\Models\ContactMethod and Database\Factories\ContactMethodFactory accordingly.
Configuring Contactable Models
To extend or define which models are considered contactable, edit:
App\Enums\ContactableType: Add your model class names to this enum.Database\Factories\ContactFactory: Customize logic to generate contacts for your specific model types.
This allows full flexibility in defining how your application links contacts to models.
Running migrations
To create the related contacts and contact_methods tables, run the generated migrations using the following command:
Usage:
Customization
The generated code serves as a starting point. You can customize and extend it according to your project's requirements. Modify the generated utilities as needed.
Contributing
Contributions are welcome! If you have suggestions, bug reports, or feature requests, please open an issue on the GitHub repository.
License
This package is open-source software licensed under the MIT license.
All versions of laravel-contacts with dependencies
illuminate/console Version ^9.0|^10.0|^11.0
illuminate/filesystem Version ^9.0|^10.0|^11.0
illuminate/support Version ^9.0|^10.0|^11.0
illuminate/validation Version ^9.0|^10.0|^11.0