src/Listeners/AddUploadsApi.php
public function prepareApiAttributes(Serializing $event)
    {
        if ($event->isSerializer(ForumSerializer::class)) {
            $event->attributes['canUpload'] = $event->actor->can('flagrow.upload');
            $event->attributes['canDownload'] = $event->actor->can('flagrow.upload.download');
        }
    }
public function prepareApiAttributes(Serializing $event)
    {
        if ($event->isSerializer(ForumSerializer::class)) {
            $event->attributes['canUpload'] = $event->actor->can('flagrow.upload');
            $event->attributes['canDownload'] = $event->actor->can('flagrow.upload.download');
        }
    }
public function prepareApiAttributes ( Serializing $ event ) { if ( $ event -> isSerializer ( ForumSerializer :: class ) ) { $ event -> attributes [ 'canUpload' ] = $ event -> actor -> can ( 'flagrow.upload' ) ; $ event -> attributes [ 'canDownload' ] = $ event -> actor -> can ( 'flagrow.upload.download' ) ; } }
Gets the api attributes and makes them available to the forum.

@param Serializing $event
Gets the api attributes and makes them available to the forum .