1. Go to this page and download the library: Download laraditz/realm-chat 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/ */
laraditz / realm-chat example snippets
public function routeNotificationForRealmChat($notification)
{
return $this->mobile_no;
}
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Laraditz\RealmChat\RealmChatChannel;
use Laraditz\RealmChat\RealmChatMessage;
class TestNotification extends Notification
{
use Queueable;
public function via($notifiable)
{
return [RealmChatChannel::class];
}
public function toRealmChat($notifiable)
{
return (new RealmChatMessage())
->content("Test send message!")
->media("https://news.tokunation.com/wp-content/uploads/sites/5/2022/07/Kamen-Rider-Geats-Teaser.jpeg", "Kamen-Rider-Geats-Teaser.jpeg");
}
}