#16: Ignore photos that have an empty camera make/model
This commit is contained in:
parent
280768d001
commit
80361c8f5c
@ -60,7 +60,11 @@ class Album extends Model
|
||||
public function cameras()
|
||||
{
|
||||
return DB::table('photos')
|
||||
->where('album_id', $this->id)
|
||||
->where([
|
||||
['album_id', $this->id],
|
||||
['camera_make', '!=', ''],
|
||||
['camera_model', '!=', '']
|
||||
])
|
||||
->groupBy('camera_make', 'camera_model', 'camera_software')
|
||||
->select('camera_make', 'camera_model', 'camera_software', DB::raw('count(*) as photo_count'))
|
||||
->orderBy('photo_count', 'desc')
|
||||
|
Loading…
Reference in New Issue
Block a user