PHP code example of filagora / filagora-messages

1. Go to this page and download the library: Download filagora/filagora-messages 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/ */

    

filagora / filagora-messages example snippets


$messages = app(\Filagora\Messages\Services\Messages::class);
$conversation = $messages->send($sender, [$recipient], 'Subject', 'Body in markdown');
$messages->reply($recipient, $conversation, 'Thanks');
$messages->open($recipient, $conversation);        // marks their copy read

$mailbox = app(\Filagora\Messages\Services\Mailbox::class);
$mailbox->trash($recipient, [$conversation->id]);
$mailbox->restore($recipient, [$conversation->id]);