laravel-notification-channels / microsoft-teams

Microsoft Teams Notifications Channel for Laravel
https://laravel-notification-channels.com
MIT License
137 stars 15 forks source link

help to sending message #23

Closed neowolfman closed 1 year ago

neowolfman commented 1 year ago

Hello, I would like to send an online message after a task, is it possible? Could you give me an example?

Note: I have not been able to send without creating a Controller, that's why my query.

Thank you

Example code

    $channel = new MicrosoftTeamsChannel(config('services.microsoft_teams.DTES_url'));

    $teamsMessage= MicrosoftTeamsMessage::create()
        ->type('warning')
        ->title('Cliente No Encontrado')
        ->content('Test<br><br>');

    $response = $channel->send(null, **$teamsMessage);**
Tob0t commented 1 year ago

Please check out the readme for an example or the laravel documentation how to send a notification.