Skip to content

use laravel Conditionable trait #139

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

Merged
merged 3 commits into from
Jan 18, 2022

Conversation

foremtehan
Copy link
Contributor

Added laravel Conditionable trait, It allows to use when on methods chain like:

TelegramMessage::create()
    ->content('body')
    ->when($condition, fn(TelegramMessage $telegram) => $telegram->buttonWithCallback('button', 123))
    ->button('button', 'url');

@foremtehan
Copy link
Contributor Author

we do support "illuminate/support": "5.5 - 9" but this trait not exists before version 8, what we should do now ?

@irazasyed
Copy link
Member

Thanks for the PR.

Please add tests for this.

Also, we can drop support for older versions prior to v8 of Laravel and release a major version of this package. I'll look into this shortly.

@foremtehan
Copy link
Contributor Author

Done.

@irazasyed irazasyed merged commit 6ae4b9d into laravel-notification-channels:master Jan 18, 2022
@irazasyed
Copy link
Member

Thank you!

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.

2 participants