function child($depth=null){
        if($depth==null)
            return self::where('parent',$this->attributes['id'])->get();
        else
            return self::where('parent',$this->attributes['id'])->where('depth',$depth)->get();
    }