Skip to content

Commit 6caa99b

Browse files
committed
Merge branch 'main' into feature/new-billing-flow
# Conflicts: # composer.lock
2 parents a0606fb + aa52d85 commit 6caa99b

10 files changed

Lines changed: 1044 additions & 417 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
namespace App\Console\Commands;
4+
5+
use App\Notifications\TestNotification;
6+
use Illuminate\Console\Command;
7+
use Illuminate\Support\Facades\Mail;
8+
use Illuminate\Support\Facades\Notification;
9+
10+
class SendTestEmail extends Command
11+
{
12+
protected $signature = 'app:send-test-email {email}';
13+
14+
protected $description = 'Send a test email via the default mail driver.';
15+
16+
public function handle(): void
17+
{
18+
$this->info('Sending test email via '.Mail::getDefaultDriver().'...');
19+
20+
Notification::route('mail', $this->argument('email'))
21+
->notify(new TestNotification);
22+
}
23+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
namespace App\Notifications;
4+
5+
use Illuminate\Bus\Queueable;
6+
use Illuminate\Notifications\Messages\MailMessage;
7+
use Illuminate\Notifications\Notification;
8+
9+
class TestNotification extends Notification
10+
{
11+
use Queueable;
12+
13+
public function via(object $notifiable): array
14+
{
15+
return ['mail'];
16+
}
17+
18+
public function toMail(object $notifiable): MailMessage
19+
{
20+
return (new MailMessage)
21+
->subject('Test Notification')
22+
->greeting('It worked!')
23+
->line('This is a test mail notification.')
24+
->action('Go to Website', url(path: '/', secure: true));
25+
}
26+
}

composer.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
"livewire/livewire": "^3.6",
2121
"spatie/laravel-menu": "^4.1",
2222
"spatie/yaml-front-matter": "^2.0",
23+
"symfony/http-client": "^7.2",
24+
"symfony/mailgun-mailer": "^7.1",
2325
"torchlight/torchlight-commonmark": "^0.5.5"
2426
},
2527
"require-dev": {

0 commit comments

Comments
 (0)