'array', ]; public function parent() { return $this->belongsTo(self::class, 'parent_id'); } public function children() { return $this->hasMany(self::class, 'parent_id'); } public function users() { return $this->belongsToMany(User::class, 'mt_user_tool', 'tool_id', 'user_id') ->withTimestamps(); } public function scopeForBusiness($query, $business_id) { return $query->where('business_id', $business_id); } }