Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Teams Laravel Package

ejtj3/teams

Simple PHP 7.2+ connector for sending Microsoft Teams messages via Incoming Webhooks. Build and send MessageCards with fluent syntax: add text, title, theme color, sections with facts/images, and interactive actions/inputs. Includes Symfony bundle option.

View on GitHub
Deep Wiki
Context7

Microsoft teams connector for PHP

Warning: This package has moved to an other repository: https://github.com/skrepr/teams-connector

A very simple PHP package for sending messages to Microsoft Teams with incoming webhooks, focused on ease-of-use and elegant syntax.

Requirements

  • PHP 7.2+

Installation

You can install the package using the Composer package manager. You can install it by running this command in your project root:

composer require ejtj3/teams

Then [create an incoming webhook](incoming webhooks) on your Microsoft teams channel for the package to use.

Basic Usage

Create a simple card

<?php

declare(strict_types=1);

use EJTJ3\Teams\Card;
use EJTJ3\Teams\Client;

$client = new Client('https://...');

$card = (new Card('Larry Bryant created a new task'))
    ->setText('Yes, he did')
    ->setThemeColor(Card::STATUS_DEFAULT)
    ->setTitle('Adding Title to the card');

$client->send($card);

Adding a section

<?php

declare(strict_types=1);

use EJTJ3\Teams\Card;
use EJTJ3\Teams\Section;

$card = new Card('Larry Bryant created a new task');

$section = (new Section('![TestImage](https://47a92947.ngrok.io/Content/Images/default.png)Larry Bryant created a new task'))
    ->setActivitySubtitle('On Project Tango')
    ->setActivityImage('https://teamsnodesample.azurewebsites.net/static/img/image5.png')
    ->addFact('Assigned to', 'Unassigned')
    ->addFact('Due date', 'Mon May 01 2017 17:07:18 GMT-0700 (Pacific Daylight Time)');

$card->addSection($section);

Adding actions & inputs to the card

<?php

declare(strict_types=1);

use EJTJ3\Teams\Card;
use EJTJ3\Teams\Actions\ActionCard;
use EJTJ3\Teams\Actions\HttpPostAction;
use EJTJ3\Teams\Inputs\TextInput;

$card = new Card('Larry Bryant created a new task');

$actionCard = (new ActionCard('Add a comment'))
    ->addInput(new TextInput('comment', 'Add a comment here for this task'))
    ->addAction(new HttpPostAction('Add comment', 'http://...'));

$card->addPotentialAction($actionCard);
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
croct/coding-standard
croct/plug-php
nqxcode/phpmorphy
boundwize/pyrameter
develia/commons
dmstr/symfony-system-resources-bundle
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
renatomarinho/laravel-page-speed
develia/geo-bundle
austinheap/laravel-database-encryption
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
imbo/imbo-coding-standard
visualbuilder/filament-lottie
servicioslineaonce/starter-kit
atomcoder/laravel-reorderable
irajul/filament-shadcn-theme
agtp/agtp-php