Skip to content

Commit

Permalink
Support Eloquent driven users (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmitchell authored Dec 5, 2023
1 parent 1109ce5 commit b6f852d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Statamic\Collaboration;

use Illuminate\Support\Facades\Broadcast;
use Statamic\Facades\User;
use Statamic\Providers\AddonServiceProvider;

class ServiceProvider extends AddonServiceProvider
Expand All @@ -18,6 +19,8 @@ public function boot()
parent::boot();

Broadcast::channel('entry.{id}.{site}', function ($user, $id, $site) {
$user = User::fromUser($user);

return [
'name' => $user->name(),
'id' => $user->id(),
Expand Down

0 comments on commit b6f852d

Please sign in to comment.