Use standard "not equal" operator

This commit is contained in:
James Brooks 2018-06-16 17:27:28 +01:00
parent 998c67b5aa
commit 1593b7b451
2 changed files with 2 additions and 2 deletions

View File

@ -194,7 +194,7 @@ class Metric extends Model implements HasPresenter
*/
public function scopeDisplayable(Builder $query)
{
return $query->where('display_chart', '=', true)->where('visible', '!=', self::VISIBLE_HIDDEN);
return $query->where('display_chart', '=', true)->where('visible', '<>', self::VISIBLE_HIDDEN);
}
/**

View File

@ -162,7 +162,7 @@ class Schedule extends Model implements HasPresenter
*/
public function scopeInProgress(Builder $query)
{
return $query->where('scheduled_at', '<=', Carbon::now())->where('status', '!=', self::COMPLETE)->where(function ($query) {
return $query->where('scheduled_at', '<=', Carbon::now())->where('status', '<>', self::COMPLETE)->where(function ($query) {
$query->whereNull('completed_at')->orWhere('completed_at', '>', Carbon::now());
});
}