agenciafmd/admix-postal
最新稳定版本:1.0.0
Composer 安装命令:
composer require agenciafmd/admix-postal
包简介
Postal - Agência F&MD
README 文档
README
- 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
其他信息
- 授权协议: Unknown
- 更新时间: 2019-08-08
