Merge pull request #14407 from snipe/bug/sc-25019_added_created_at_pivot

Added created_at to license pivot
This commit is contained in:
snipe 2024-03-10 16:40:56 +00:00 committed by GitHub
commit 1df56a7cab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -337,7 +337,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
*/
public function licenses()
{
return $this->belongsToMany(\App\Models\License::class, 'license_seats', 'assigned_to', 'license_id')->withPivot('id');
return $this->belongsToMany(\App\Models\License::class, 'license_seats', 'assigned_to', 'license_id')->withPivot('id', 'created_at', 'updated_at');
}
/**

View file

@ -151,7 +151,7 @@
<i class="fa-lock" aria-hidden="true"></i> {{ str_repeat('x', 15) }}
@endcan
</td>
<td>{{ $license->pivot->created_at }}</td>
<td>{{ $license->pivot->updated_at }}</td>
</tr>
@php
$lcounter++