定制 agenciafmd/admix-postal 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

agenciafmd/admix-postal

最新稳定版本:1.0.0

Composer 安装命令:

composer require agenciafmd/admix-postal

包简介

Postal - Agência F&MD

README 文档

README

Área Administrativa

Downloads Licença

  • Map all forms from your application and send them to specific emails

Installation

composer require agenciafmd/admix-postal:dev-master

Run the migrations

php artisan migrate

If you want to use the seeder, run

php artisan vendor:publish --tag=admix-postal:seeders

Usage

    // if you want to send attachments
    $attachments = null;
    if ($request->has('images')) {
        $images = $request->file('images');
        foreach ($images as $image) {
            $customName = Str::of($request->name)->slug() . '-' . Str::random(5) . '.' . $image->getClientOriginalExtension();
            /* TODO: refactor with Storage */
            $attachments[] = storage_path(
                'app/' . $image
                    ->storeAs('attachments', $customName, 'local')
            );
        }
    }

    // fill if you want to customize the subject
    $customSubject = null;
    Postal::query()
        ->where('slug', 'slug-of-created-form')
        ->first()
        ->notify(new SendNotification([
            'greeting' => $request->subject,
            'introLines' => [
                '**Nome:** ' . $request->name,
                '**E-mail:** ' . $request->email,
                '**Telefone:** ' . $request->phone,
                '**Cidade:** ' . $request->city . ' - ' . $request->state,
                '**Mensagem:** ' . nl2br($request->message),
            ],
        ], [$request->email => $request->name], $attachments, $customSubject));

统计信息

  • 总下载量: 6.69k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2019-08-08