mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +00:00
Fix firstMedia()
call to firstMedia
since now it's a proper relationship and does not need to be called as a method.
This commit is contained in:
parent
00014b521a
commit
9b82dd1e55
3 changed files with 4 additions and 4 deletions
|
@ -25,7 +25,7 @@ class Status extends Model
|
|||
|
||||
public function thumb()
|
||||
{
|
||||
return url(Storage::url($this->firstMedia()->thumbnail_path));
|
||||
return url(Storage::url($this->firstMedia->thumbnail_path));
|
||||
}
|
||||
|
||||
public function url()
|
||||
|
|
|
@ -56,8 +56,8 @@ class ProfileOutbox extends Fractal\TransformerAbstract
|
|||
// TODO: support more than 1 attachment
|
||||
[
|
||||
'type' => 'Document',
|
||||
'mediaType' => $i->firstMedia()->mime,
|
||||
'url' => $i->firstMedia()->url(),
|
||||
'mediaType' => $i->firstMedia->mime,
|
||||
'url' => $i->firstMedia->url(),
|
||||
'name' => null
|
||||
]
|
||||
],
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
@if(!$status->media_path)
|
||||
<td class="font-weight-bold">0</td>
|
||||
@else
|
||||
<td><div class="human-size" data-bytes="{{$status->firstMedia()->size}}">{{$status->firstMedia()->size}}</div></td>
|
||||
<td><div class="human-size" data-bytes="{{$status->firstMedia->size}}">{{$status->firstMedia->size}}</div></td>
|
||||
@endif
|
||||
<td class="font-weight-bold">{{$status->created_at->diffForHumans(null, true, true, true)}}</td>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in a new issue