1. Go to this page and download the library: Download geekyants/share-dialog 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/ */
geekyants / share-dialog example snippets
use Geekyants\Sharedo\Events\UserAbilityChanged;
use Geekyants\Sharedo\Listeners\SendUserAbilityChangedNotification;
protected $listen = [
...
UserAbilityChanged::class => [
SendUserAbilityChangedNotification::class,
]
];
namespace App\Repository;
use App\Models\User;
use Geekyants\Sharedo\Interfaces\UserContactsInerface;
class SendUserContacts implements UserContactsInerface
{
public function getUserContacts($query)
{
$users = Some operation to get users
$users = json_encode($users); //convert users array to json string
return $users;
}
}