use BookStack\Auth\Permissions\PermissionService;
use BookStack\Auth\User;
use BookStack\Entities\Entity;
+use Illuminate\Database\Eloquent\Relations\Relation;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
$activity = $this->permissionService
->filterRestrictedEntityRelations($query, 'activities', 'entity_id', 'entity_type')
->orderBy('created_at', 'desc')
- ->with(['entity', 'user.avatar'])
+ ->with(['entity' => function (Relation $query) {
+ $query->withTrashed();
+ }, 'user.avatar'])
->skip($count * ($page - 1))
->take($count)
->get();
{{ $activity->getText() }}
- @if($activity->entity)
+ @if($activity->entity && is_null($activity->entity->deleted_at))
<a href="{{ $activity->entity->getUrl() }}">{{ $activity->entity->name }}</a>
@endif
+ @if($activity->entity && !is_null($activity->entity->deleted_at))
+ "{{ $activity->entity->name }}"
+ @endif
+
@if($activity->extra) "{{ $activity->extra }}" @endif
<br>