Coder Social home page Coder Social logo

Comments (7)

milewski avatar milewski commented on August 10, 2024

Sorry I don't understand what you mean, can you give an example?

from nova-mega-filter.

phoenixg avatar phoenixg commented on August 10, 2024

@milewski

In resource field, commonly I wrote:

BelongsTo::make('My Merchant', 'merchant', \App\Nova\Merchant::class),

My $title = 'display_name'; in Merchant resource class let it display as a semantic meaningful "display_name", not "ID", if I use Column::make('Merchant ID', 'merchant_id')->checked(), it only allow me to use the actual value in the table, not the related "display_name".

from nova-mega-filter.

milewski avatar milewski commented on August 10, 2024

This doesn't work?

Column::make('My Merchant', 'merchant')->checked()

from nova-mega-filter.

phoenixg avatar phoenixg commented on August 10, 2024

This doesn't work?

Column::make('My Merchant', 'merchant')->checked()

No, merchant is the field of the table, but merchant display name(field name called merchant_display_name), which I want to use, is not in the table, it's in the relation table that belongsTo() can work, because I can specify it in the $title of that resource.

from nova-mega-filter.

milewski avatar milewski commented on August 10, 2024

Im not really getting what you are saying... if you can post your full nova resource file.. would be easier for me to understand what you mean

from nova-mega-filter.

phoenixg avatar phoenixg commented on August 10, 2024

I find a document may explain my need: https://nova.laravel.com/docs/2.0/resources/relationships.html#belongsto

from nova-mega-filter.

milewski avatar milewski commented on August 10, 2024

I know how that belongs to works, what im not understanding is why this example is not working for you:

Column::make('My Merchant', 'merchant')->checked()

Because I use this on my projects and it works fine with relationships, the name of the column shown the column selection is exactly what the name you give to the first argument My Merchant

from nova-mega-filter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.