Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Pivot Table select? #23

Open
dan-lutd opened this issue Dec 2, 2021 · 0 comments
Open

Pivot Table select? #23

dan-lutd opened this issue Dec 2, 2021 · 0 comments

Comments

@dan-lutd
Copy link

dan-lutd commented Dec 2, 2021

Any idea how to populate the Select from the Vendor Selected?

I am using a pivot table from Vendor Resource:

        `BelongsToMany::make(__('Vendors'), 'vendors', 'App\Nova\Vendor')
            ->fields( new VendorLocationFields()),`

and Fields file function:
`public function __invoke($request, $relatedModel)
{
$dist_centers = \App\Models\DistributionCenter::all()->pluck('name', 'id');

    return [
        Text::make('Account Number')
        Text::make('Vendor Username'),
        Select::make('Distribution Center','distribution_center_id')
            ->displayUsingLabels()
            ->options($dist_centers)
            ,
    ];
}`
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant