Update status model, use scope over deprecated visibility attribute
This commit is contained in:
parent
7225c1f3af
commit
f70826e18c
5 changed files with 8 additions and 8 deletions
|
@ -181,14 +181,14 @@ class DiscoverController extends Controller
|
|||
$ttl = now()->addHours(2);
|
||||
$res = Cache::remember($key, $ttl, function() use($range) {
|
||||
if($range == '-1') {
|
||||
$res = Status::whereVisibility('public')
|
||||
$res = Status::whereScope('public')
|
||||
->whereType('photo')
|
||||
->whereIsNsfw(false)
|
||||
->orderBy('likes_count','desc')
|
||||
->take(12)
|
||||
->get();
|
||||
} else {
|
||||
$res = Status::whereVisibility('public')
|
||||
$res = Status::whereScope('public')
|
||||
->whereType('photo')
|
||||
->whereIsNsfw(false)
|
||||
->orderBy('likes_count','desc')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue