Skip to content
This repository has been archived by the owner on Aug 23, 2021. It is now read-only.

binomedev/contact

Repository files navigation

Contact

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.

About

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

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published