diff --git a/src/Api/Serializers/BaseSerializer.php b/src/Api/Serializers/BaseSerializer.php index cbdf0effb..846992a0d 100644 --- a/src/Api/Serializers/BaseSerializer.php +++ b/src/Api/Serializers/BaseSerializer.php @@ -11,7 +11,7 @@ use Closure; */ abstract class BaseSerializer extends SerializerAbstract { - protected $actor; + public $actor; /** * The custom relationships on this serializer. diff --git a/src/Support/ServiceProvider.php b/src/Support/ServiceProvider.php index 8bc434a98..831ab123a 100644 --- a/src/Support/ServiceProvider.php +++ b/src/Support/ServiceProvider.php @@ -87,7 +87,7 @@ class ServiceProvider extends IlluminateServiceProvider { $this->app['events']->listen('Flarum\Api\Events\SerializeAttributes', function ($event) use ($serializer, $callback) { if ($event->serializer instanceof $serializer) { - $callback($event->attributes, $event->model); + $callback($event->attributes, $event->model, $event->serializer); } }); }