mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-11 00:54:50 +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()
|
public function thumb()
|
||||||
{
|
{
|
||||||
return url(Storage::url($this->firstMedia()->thumbnail_path));
|
return url(Storage::url($this->firstMedia->thumbnail_path));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function url()
|
public function url()
|
||||||
|
|
|
@ -56,8 +56,8 @@ class ProfileOutbox extends Fractal\TransformerAbstract
|
||||||
// TODO: support more than 1 attachment
|
// TODO: support more than 1 attachment
|
||||||
[
|
[
|
||||||
'type' => 'Document',
|
'type' => 'Document',
|
||||||
'mediaType' => $i->firstMedia()->mime,
|
'mediaType' => $i->firstMedia->mime,
|
||||||
'url' => $i->firstMedia()->url(),
|
'url' => $i->firstMedia->url(),
|
||||||
'name' => null
|
'name' => null
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
@if(!$status->media_path)
|
@if(!$status->media_path)
|
||||||
<td class="font-weight-bold">0</td>
|
<td class="font-weight-bold">0</td>
|
||||||
@else
|
@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
|
@endif
|
||||||
<td class="font-weight-bold">{{$status->created_at->diffForHumans(null, true, true, true)}}</td>
|
<td class="font-weight-bold">{{$status->created_at->diffForHumans(null, true, true, true)}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
Loading…
Reference in a new issue