Skip to content
This repository has been archived by the owner on Dec 27, 2019. It is now read-only.
/ Contacts Public archive

Laravel Enso Contacts is a flexible contact persons add-on that allows you to add contact persons for various entities so users have an easier time of reaching out when they need to get in touch with partners or clients

License

Notifications You must be signed in to change notification settings

laravel-enso/Contacts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contacts

License Total Downloads Latest Stable Version

Contacts dependency for Laravel Enso.

Screenshot

Features

  • allows the management of contact persons, attached to other entities, such as owners
  • uses a polymorphic relationship for flexibility when attaching
  • contacts can be disabled while still keeping them, for reference
  • comes with a Contacts.vue VueJS component meant to be included anywhere, and an index page to list all contacts
  • uses the VueComponents package in order to load its VueJS dependencies

Installation steps

The component is already included in the Enso install and should not require any additional installation steps.

Use

  1. Define the 'model_alias' => 'App\Model' mapping in the config/enso/contacts.php file

  2. Add the Contactable trait in the Model to which you need to add contacts You can then use the $model->contacts relationship

  3. Use the VueJS component in your pages/components

    <contacts
        type="model_alias"
        id="entityId"
        :open="true"
        title="My Custom Title" >
    </contacts>
    

Options

The Contacts.vue component can be used anywhere, can be integrated into any other component or page, and takes the following parameters:

  • id - the id of the entity | required
  • type - string, the entity type, set in the configuration file | required
  • open - boolean, flag which, if true, makes the component start in the open state | default false | (optional)
  • title - string, title for the component | default 'Contacts' | (optional)

Publishes

  • php artisan vendor:publish --tag=contacts-config - the configuration file
  • php artisan vendor:publish --tag=contacts-assets - the VueJS components
  • php artisan vendor:publish --tag=enso-assets - a common alias for when wanting to update the VueJS component, once a newer version is released, can be used with the --force flag
  • php artisan vendor:publish --tag=enso-config - a common alias for when wanting to update the config, once a newer version is released, can be used with the --force flag

Notes

The Laravel Enso package comes with this package included.

Depends on:

Contributions

are welcome. Pull requests are great, but issues are good too.

License

This package is released under the MIT license.

About

Laravel Enso Contacts is a flexible contact persons add-on that allows you to add contact persons for various entities so users have an easier time of reaching out when they need to get in touch with partners or clients

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •