PHP code example of symfony / bluesky-notifier
1. Go to this page and download the library: Download symfony/bluesky-notifier library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
symfony / bluesky-notifier example snippets
use Symfony\Component\Notifier\Bridge\Bluesky\BlueskyOptions;
use Symfony\Component\Notifier\Message\ChatMessage;
$message = new ChatMessage('My message');
// Add website preview card to the message
$options = (new BlueskyOptions())
->attachCard('https://example.com', new File('image.jpg'))
// You can also add media to the message
//->attachMedia(new File($command->fileName), 'description')
;
// Add the custom options to the Bluesky message and send the message
$message->options($options);
$chatter->send($message);