Console recurring re-factory

This commit is contained in:
Cüneyt Şentürk
2020-10-20 18:27:26 +03:00
parent 66e4c4064e
commit fded803b72
3 changed files with 73 additions and 30 deletions

View File

@ -26,4 +26,16 @@ class Recurring extends Model
{
return $this->morphTo();
}
/**
* Scope to get all rows filtered, sorted and paginated.
*
* @param \Illuminate\Database\Eloquent\Builder $query
*
* @return \Illuminate\Database\Eloquent\Builder
*/
public function scopeAllCompanies($query)
{
return $query->where('company_id', '<>', '0');
}
}