Last active
October 13, 2019 16:57
-
-
Save breizhwave/0725431c5eb07ccddd54acfda5aa06ba to your computer and use it in GitHub Desktop.
Laravel Nova SearchableSelect linked on index
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BelongsTo::make('Product')->rules('required')->hideWhenCreating()->hideWhenUpdating(), | |
SearchableSelect::make('Product', 'product_id')->resource("products")->loadResourcesOnNew()->displayUsing(function($product) {return $this->product->title ; })->hideFromIndex(), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment