PHP code example of susheelbhai / larameet
1. Go to this page and download the library: Download susheelbhai/larameet 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/ */
susheelbhai / larameet example snippets
php artisan install:broadcasting
php artisan vendor:publish --tag="larameet" --force
php artisan migrate
use App\Models\User;
use Illuminate\Support\Facades\Broadcast;
Broadcast::channel('chat.{id}', function ($user, $id) {
return (int) $user->id === (int) $id || User::find($id)->id;
});