binomedev/contact

This package is abandoned and no longer maintained. The author suggests using the binomeway/nova-contact-tool package instead.

Contact

dev-master 2021-02-25 21:40 UTC

This package is auto-updated.

Last update: 2021-07-20 23:01:22 UTC


README

Latest Version on Packagist GitHub Tests Action Status Total Downloads

A package to manage contact information such as: email, phone, socials and forms.

Installation

You can install the package via composer:

composer require binomedev/contact

Install nova-settings

composer require optimistdigital/nova-settings

Add the following line to the boot method within the NovaServiceProvider.php in order to be able to modify contact data withing Nova.

use Binomedev\Contact\ContactSettings;

// NovaServiceProvider.php 
public function boot()
{
    // ...
    ContactSettings::boot();
}

You can publish and run the migrations with:

php artisan vendor:publish --provider="Binomedev\Contact\ContactServiceProvider" --tag="contact-migrations"
php artisan migrate

You can publish the config file with:

php artisan vendor:publish --provider="Binomedev\Contact\ContactServiceProvider" --tag="contact-config"

This is the contents of the published config file:

return [
    'default_email_receiver' => env('MAIL_FROM_ADDRESS'),
    'save_messages' => true,

    'emails' => [
        // contact@domain.com
    ],

    'numbers' => [
        // +32 1111  111 111
    ],

    'socials' => [

    ],

    'addresses' => [
        [
            'name' => 'Office',
            'street' => '',
            'number' => '',
            'postcode' => '',
            'city' => '',
            'country' => '',
        ],
    ],
    'schedule' => [
        [
            'days' => '',
            'hours' => '',
        ]
    ],
];

Usage

use Binomedev\Contact\ContactFacade;
// Subscribe a new email
$subscriber = ContactFacade::subscribe(
    $data['email'],
    $data['name'],
    $data['phone'],
);

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.