Skip to content

Commit b7a752a

Browse files
committed
Merge branch 'main' of https://github.com/promethys/revive
2 parents a8a5980 + b29e32a commit b7a752a

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/RevivePlugin.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ final class RevivePlugin implements Plugin
1717
protected bool | Closure $authorizeUsing = true;
1818

1919
protected string $page = RecycleBinPage::class;
20+
2021
protected string $table = RecycleBinTable::class; // raw value 'revive::tables.recycle-bin'
2122

2223
protected string | Closure | null $navigationGroup = null;

src/Tables/RecycleBin.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function mount(
8282
$this->enableTenantScoping = $enableTenantScoping;
8383

8484
// Auto-detect current user and tenant if not provided
85-
if (!$this->showAllRecords) {
85+
if (! $this->showAllRecords) {
8686
if ($this->user === null && $this->enableUserScoping) {
8787
$this->user = Auth::user();
8888
}
@@ -117,18 +117,18 @@ protected function getQuery(): Builder
117117
$query = RecycleBinItem::query();
118118

119119
// Apply model filtering
120-
if (!empty($this->models)) {
120+
if (! empty($this->models)) {
121121
$query->whereIn('model_type', $this->models);
122122
}
123123

124124
// Apply user scoping
125-
if (!$this->showAllRecords && $this->enableUserScoping && $this->user) {
125+
if (! $this->showAllRecords && $this->enableUserScoping && $this->user) {
126126
$userId = is_object($this->user) ? $this->user->getKey() : $this->user;
127127
$query->where('deleted_by', $userId);
128128
}
129129

130130
// Apply tenant scoping
131-
if (!$this->showAllRecords && $this->enableTenantScoping && $this->tenant) {
131+
if (! $this->showAllRecords && $this->enableTenantScoping && $this->tenant) {
132132
$tenantId = is_object($this->tenant) ? $this->tenant->getKey() : $this->tenant;
133133
$query->where('tenant_id', $tenantId);
134134
}
@@ -154,7 +154,7 @@ protected function getTableColumns(): array
154154
->label(__('revive::translations.tables.columns.deleted_by'))
155155
->getStateUsing(function (RecycleBinItem $record) {
156156
/** @phpstan-ignore property.notFound (Eloquent false positive) */
157-
if (!$record->deleted_by) {
157+
if (! $record->deleted_by) {
158158
return null;
159159
}
160160

@@ -170,7 +170,7 @@ protected function getTableColumns(): array
170170
return "User #{$record->deleted_by}";
171171
})
172172
->placeholder('N/A')
173-
->visible(fn() => $this->showAllRecords || !$this->enableUserScoping),
173+
->visible(fn () => $this->showAllRecords || ! $this->enableUserScoping),
174174

175175
TextColumn::make('deleted_at')
176176
->label(__('revive::translations.tables.columns.deleted_at'))

0 commit comments

Comments
 (0)