iam usin laravel5 and i install Brainsocket package in it
in vendor folder it have structure of:
vindor/brainboxlabs/brain-socket/src/brainsocket
and this code in /brainSocketeventlistner.php
public function onOpen(ConnectionInterface $conn) {
var_dump(Auth::user()); // Returns Null
echo "Connection Established! \n";
$this->clients->attach($conn);
connections::create([
'user_id' => '3232',
'connection_id' => $conn->resourceId
]);
so iam using to uses
use Auth;
use App\Connections;
i can access App\connections but i cant access Auth to get logged in user data !!
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1WSfgMM
via IFTTT
Aucun commentaire:
Enregistrer un commentaire