1. Go to this page and download the library: Download mortezamasumi/fb-message 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/ */
use Mortezamasumi\FbMessage\FbMessagePlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugin(FbMessagePlugin::make());
}
use Illuminate\Database\Eloquent\Builder;
public function scopeMessageTo(Builder $query): Builder
{
return $query;
}
use Mortezamasumi\FbMessage\Facades\FbMessage;
FbMessage::markAsRead($message); // mark as read for the current user
FbMessage::archive($message); // move to the archived folder
FbMessage::unarchive($message); // restore to inbox / sent
FbMessage::trash($message); // move to the trash folder
FbMessage::restore($message); // restore from trash
FbMessage::forget($message); // detach the current user and delete when nobody references it