How use Morph relations #892
MarcinStefaniak
started this conversation in
General
Replies: 1 comment
-
There is currently limited relational support, I'm working on it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
How used morph relations in create Column?
I have below code in class ContractorTable
public function columns(): array { return [ Column::make('Address', 'address.street'), ]; } public function builder(): Builder { return Contractor::query() ->with('address') ->select(); }
and in Model Contractor:
public function address(): MorphOne { return $this->morphOne(Address::class, 'addressable'); }
I get error:
Rappasoft\LaravelLivewireTables\Views\Column::setTable(): Argument #1 ($table) must be of type string, null given, called in /home/vagrant/code/th24/vendor/rappasoft/laravel-livewire-tables/src/Traits/Helpers/ColumnHelpers.php on line 24
Beta Was this translation helpful? Give feedback.
All reactions