PLATFORM
  • Tails

    Create websites with TailwindCSS

  • Blocks

    Design blocks for your website

  • Wave

    Start building the next great SAAS

  • Pines

    Alpine & Tailwind UI Library

  • Auth

    Plug'n Play Authentication for Laravel

  • Designer comingsoon

    Create website designs with AI

  • DevBlog comingsoon

    Blog platform for developers

  • Static

    Build a simple static website

  • SaaS Adventure

    21-day program to build a SAAS

Question By
Solved

Browse, edit, add, delete related datatables from parent?

Solved
johannesmoellerherm

Sep 5th, 2022 09:18 AM

Hi there,

I am wondering if it is somehow possible in wave/voyager to browse (edit, add, delete) a related datatable. I'm builing a simple form builder in which a user can have many forms and a form has many fields. Forms and fields are two different tables. It would be nice to configure the belonging fields within or below the form bread.

I tried to stitch together a screenshot for better understanding:

Bild1.jpg

I hope you understand what I mean.

bobbyiliev

Sep 6th, 2022 07:58 AM

Best Answer

Hi there,

I beleive that you can define belongsTo, belongsToMany, hasOne, and hasMany relationships directly in Voyager by following the steps here:

https://voyager-docs.devdojo.com/bread/relationships

Is this what you are after? Or would you rather actually display the field as an input rather that its value?

If it is the latter, then you would need to customize your BREAD files and add your custom logic as described here:

https://voyager-docs.devdojo.com/customization/overriding-files

Let me know how it goes!

Report
1
johannesmoellerherm

Sep 6th, 2022 11:07 PM

Hi bobbyiliev,

yes, I want to display the belonging fields as input rather than its value. Looks like I have to specify a custom blade for the form bread and possibly adapt the controller. Thanks for the help.

Nevertheless it would be a nice standard feature for voyager. Laravel Filament for example offers it out of the box.

bobbyiliev

Sep 7th, 2022 04:54 AM

Hey there,

Indeed this sounds like a very good idea! I've certainly had cases where this would have been quite handy.

The best thing that you could do is to open a feature request under the Voyager official GitHub repo:

https://github.com/the-control-group/voyager