Another step forward in our QuickAdminPanel – expanding the functionality of belongsTo relationship. Now you can choose to add “child” entries directly within a “parent” entry form. Here’s how it looks.

Now, while creating a field with belongsTo Relationship type, you will see a new checkbox:

parent child laravel

In this example we’re creating an Author field on CRUD Books with relationship to Users table.

Author Books belongsTo Users

So if that checkbox is checked, we will be able to add Books directly while creating a User! See here:

parent child entries

So you will be able to click Add new multiple times in bottom-right corner, and add as many books as you want.

I guess the most common example of this is Invoices: you create an invoice, and then you need to add lines for items. So this function will help you do exactly that.

The same logic works in both online version and in your downloaded adminpanel. (That’s actually the part that takes the most of our time – to make new functions work both online and offline)

Log in to your admin panel and try it out!