Skip to content

Commit 992214f

Browse files
committed
Check for adminuser withTrashed
Signed-off-by: snipe <[email protected]>
1 parent 93dab12 commit 992214f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/Models/AssetModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ public function uploads()
234234
*/
235235
public function adminuser()
236236
{
237-
return $this->belongsTo(\App\Models\User::class, 'created_by');
237+
return $this->belongsTo(\App\Models\User::class, 'created_by')->withTrashed();
238238
}
239239

240240

resources/views/models/view.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ class="table table-striped snipe-table"
164164
</li>
165165
@endif
166166

167-
@if ($model->created_by)
167+
@if ($model->adminuser)
168168
<li>{{ trans('general.created_by') }}:
169169
{{ $model->adminuser->present()->name() }}
170170
</li>

0 commit comments

Comments
 (0)