Laravel Talk — A realtime messaging system

Nahid Bin Azhar
Jun 14, 2017 · 2 min read

Features

Installations

composer require nahid/talk

Configurations

Nahid\Talk\TalkServiceProvider::class,
'Talk'      => Nahid\Talk\Facades\Talk::class,
php artisan vendor:publish --provider="Nahid\Talk\TalkServiceProvider"
php artisan migrate
return [
'user' => [
'model' => 'App\User'
],
'broadcast' => [
'enable' => false,
'app_name' => 'your-app-name',
'pusher' => [
'app_id' => '',
'app_key' => '',
'app_secret' => '',
'options' => [
'cluster' => 'ap1',
'encrypted' => true
]
]
]
];

Usage

'talk'  =>  \Nahid\Talk\Middleware\TalkMiddleware::class,
$this->middleware('talk');
Talk::setAuthUserId(auth()->user()->id);
Talk::user(auth()->user()->id)->anyMethodHere();

Nahid Bin Azhar

Written by

The AL!EN

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade