DEV Community

Cover image for How To Manage a List of NESTED Entities with Laravel and Vue3
Patrick O'Dacre
Patrick O'Dacre

Posted on

1 1

How To Manage a List of NESTED Entities with Laravel and Vue3

You'll make more money and earn more respect when you deliver quality code faster. Laranerds.dev helps you do just that. Sign up to be notified when new resources are published.

In a previous post I shared a simple approach to managing a list of entities -- a pattern seen in many applications.

In this post I would like to share an approach I take to managing a list of nested entities, where the top-level entities also have child entities.

Our Imaginary Feature Request - Tags

Tags or Labels are a helpful feature that can make managing your application data easier.

In this example we'll look at creating Tags as well as Categories to organize those Tags. Our top-level entity is the Tag Category, and the child entities would be the Tags themselves.

If you want to follow along with this example you can either clone this Laranerds Example Application, or you can implement these changes in your own practice Laravel application.

Ensure you checkout this tag - Manage Entities v2

After cloning the repo run git checkout ManageEntities-2 in your terminal.

Explanation

For a detailed explanation, check out the video here::

But sure to sign up at Laranerds if you want to be notified when new tutorials and code snippets are published.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay