laravel-livewire-tables
laravel-livewire-tables copied to clipboard
Allow query for other column types
All Submissions:
- [x] Have you followed the guidelines in our Contributing document?
- [x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
New Feature Submissions:
- [x] Does your submission pass tests and did you add any new tests needed for your feature?
- [x] Did you update all templates (if applicable)?
- [x] Did you add the relevant documentation (if applicable)?
- [x] Did you test locally to make sure your feature works as intended?
Changes to Core Features:
- [x] Have you added an explanation of what your changes do and why you'd like us to include them?
- [ ] Have you written new tests for your core changes, as applicable?
- [x] Have you successfully ran tests with your changes locally?
In case the ImageColumn or LinkColumn is not supposed to use the primary key of the row ImageColumn and LinkColumn can not be used right now, their field value is completely irrelevant. Added a check for field so that it will be queried too if set (why else would you set it for these columns):
(new ImageColumn('Image', 'image'))
->location(function($row) {
return $row->image;
})
->attributes(function($row) {
return [
'class' => 'w-8 h-8 rounded-full',
];
})
Can I have an example of why this is needed?
Can I have an example of why this is needed?
My image can be a local file, an s3 temporary url or just any http* so just using ID does not work for me here. Actually the image property is an \Illuminate\Database\Eloquent\Casts\Attribute
that does resolve to either one of the previously mentioned types. I fell back to creating my own column type before moving to another solution.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.