Beautiful Open-Source Form Builder
<?php
namespace App\Notifications\Subscription;
use App\Models\LicenseKey;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
class LicenseKeyNotification extends Notification
{
use Queueable;
public function __construct(private LicenseKey $licenseKey)
{
}
public function via($notifiable): array
{
return ['mail'];
}
public function toMail($notifiable): MailMessage
{
return (new MailMessage())
->subject('Your OpnForm Enterprise License Key')
->greeting('Thank you for purchasing OpnForm Enterprise!')
->line('Your license key is ready. Copy it and enter it in your self-hosted instance to activate Enterprise features.')
->line('**Your License Key:**')
->line('`' . $this->licenseKey->license_key . '`')
->line('**How to activate your license:**')
->line('1. Open your email and copy the license key.')
->line('2. Go back to your self-hosted OpnForm instance.')
->line('3. Click your avatar in the sidebar and open **User Settings**.')
->line('4. Go to the **License** tab, paste your key, and click **Activate License**.');
}
}