mirror of
https://github.com/snipe/snipe-it.git
synced 2026-03-01 13:59:07 +00:00
19 lines
326 B
PHP
19 lines
326 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');
|
|
}
|
|
|
|
|
|
} |