mirror of
https://github.com/snipe/snipe-it.git
synced 2026-03-29 20:04:21 +00:00
18 lines
322 B
PHP
18 lines
322 B
PHP
<?php
|
|
|
|
namespace App\Models\Traits;
|
|
|
|
use App\Models\Actionlog;
|
|
|
|
trait HasUploads
|
|
{
|
|
|
|
public function uploads() {
|
|
return $this->hasMany(Actionlog::class, 'item_id')
|
|
->where('item_type', self::class)
|
|
->where('action_type', '=', 'uploaded')
|
|
->whereNotNull('filename');
|
|
}
|
|
|
|
|
|
} |