Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addition of 'lineIf' method to messages #190

Merged
merged 2 commits into from Feb 22, 2024

Conversation

MammutAlex
Copy link
Contributor

This pull request introduces a new method called 'lineIf' to the codebase.
The 'lineIf' method adds a line to the content if the first argument evaluates to true. This enhancement is inspired by a similar method found in Laravel's MailMessage class (https://laravel.com/api/10.x/Illuminate/Notifications/Messages/MailMessage.html#method_lineIf)

 TelegramMessage::create()
            ->to($notifiable->telegram_user_id)
            ->lineIf($this->amount > 0, "Amount paid: {$this->amount}");

@irazasyed irazasyed merged commit 7218bb2 into laravel-notification-channels:master Feb 22, 2024
2 of 3 checks passed
@irazasyed
Copy link
Member

Nice addition ✨👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants