Nosean
6 months ago

Display a Collection

Posted 6 months ago by Nosean

Hey Guys, i have the follow Collection

Collection {#1141 ▼
  #items: array:2 [▼
    "Aussattechnik" => Collection {#1139 ▼
      #items: array:2 [▼
        0 => {#1054 ▼
          +"id": 2
          +"category_name": "Aussattechnik"
          +"deleted_at": null
          +"created_at": "2019-02-21 12:52:55"
          +"updated_at": "2019-02-21 12:52:55"
          +"categorie_id": 1
          +"undercategorie_name": "Direktsaatmachine"
        }
        1 => {#1055 ▼
          +"id": 3
          +"category_name": "Aussattechnik"
          +"deleted_at": null
          +"created_at": "2019-02-21 12:53:17"
          +"updated_at": "2019-02-21 12:53:17"
          +"categorie_id": 1
          +"undercategorie_name": "Drillmachine"
        }
      ]
    }
    "Bagger & Lader" => Collection {#1140 ▼
      #items: array:2 [▼
        0 => {#1056 ▼
          +"id": 4
          +"category_name": "Bagger & Lader"
          +"deleted_at": null
          +"created_at": "2019-02-21 12:53:34"
          +"updated_at": "2019-02-21 12:53:34"
          +"categorie_id": 3
          +"undercategorie_name": "Arbeitsbühne"
        }
        1 => {#1057 ▼
          +"id": 5
          +"category_name": "Bagger & Lader"
          +"deleted_at": null
          +"created_at": "2019-02-21 12:55:13"
          +"updated_at": "2019-02-21 12:55:13"
          +"categorie_id": 3
          +"undercategorie_name": "Bagger"
        }
      ]
    }
  ]
}

Would like to have the collection displayed in something like this:

1. Aussatmachine 
1.1 Direktsaatm.
1.2 Drillmachine
2. Bagger & Lader
2.1 Arbeitsbühne
2.2 Bagger

etc.

Anyone have an idea how I should proceed? thx

Please sign in or create an account to participate in this conversation.