技术简单/contact

这将向管理员发送电子邮件并将联系查询保存到数据库中。

v1.0.0 2021-12-10 17:46 UTC

This package is auto-updated.

Last update: 2024-09-12 11:40:03 UTC


README

Issues Stars

这是一个强大的处理联系我们功能的包。它将向管理员发送电子邮件并将联系查询保存在Laravel数据库中。支持Laravel 5.3, 5.4, 5.5, 5.6, 5.7, 5.8, 6.0, 7.0和8.0+。

安装

此包非常容易设置。只需几个步骤。

Composer

在终端中从您的项目根目录运行

Laravel 5.5及更高版本使用

    composer require technicalsimple/contact

Laravel 5.4及以下版本使用

    composer require technicalsimple/contact 1.0.0

服务提供者

  • Laravel 5.5及更高版本使用包自动发现功能,无需编辑config/app.php文件。

  • Laravel 5.4及以下版本在config/app.php文件中将包添加到您的应用程序服务提供者中。

      'providers' => [
    
          ...
    
          /**
          * Third Party Service Providers...
          */
          \technicalsimple\Contact\ContactServiceProvider::class,
    
      ],    
    

发布所有资源

 php artisan vendor:publish --provider="technicalsimple\Contact\ContactServiceProvider"

发布ContactServiceProvider后,转到app/config/contact.php并更改管理员电子邮件详细信息。

  <?php

    return [
        'admin' => 'Admin', // admin name
        'send_email_to' => 'example@gmail.com', //admin email
    ];

另外,请设置env文件中的电子邮件配置详细信息。

迁移

这将创建联系人表。

 php artisan migrate