mirror of
https://github.com/flarum/framework.git
synced 2024-11-28 20:16:08 +08:00
Expose serializer/actor to extensions
This commit is contained in:
parent
b4e5f0e6e5
commit
8e6adb9be0
|
@ -11,7 +11,7 @@ use Closure;
|
|||
*/
|
||||
abstract class BaseSerializer extends SerializerAbstract
|
||||
{
|
||||
protected $actor;
|
||||
public $actor;
|
||||
|
||||
/**
|
||||
* The custom relationships on this serializer.
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user