hasMany('App\User'); } public function society() { return $this->belongsTo('App\Models\Society'); } public function scopeActive($query) { return $query->where('active', 1); } public function scopeBySociety($query, $id) { return $query->where('society_id', $id); } }