hasMany('App\Transaction'); } public function scopeNotLimit($query) { return $query->where('borrow', '<', 3); } public function scopeActive($query) { return $query->where('status', 1); } public function scopeOrderByName($query) { return $query->orderBy('name'); } }