You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Query for morphTo relationship will get an exception of "Please use whereHasMorph for morph relationship" error.
Idea of change
Add new condition for a bit more complex setups as array.
// Example, the data relationship has different morph types for purpose, and we can specify a condition as array for those needed parameters. publicProductRepositoryextendsBaseRepository {
protected $fieldSearchable = [
'product_name' => 'like',
'data.category' => [
'relationType' => 'morph',
'condition' => '=',
'types' => [Turnkey::class, Pcba::class, Pcb::class, MouldTooling::class, Accessory::class],
],
];
The idea code is just an example for describing the idea, this issue could be used to discuss if any potential problem of this change and recommendations.
The text was updated successfully, but these errors were encountered:
Problem
Query for morphTo relationship will get an exception of "Please use whereHasMorph for morph relationship" error.
Idea of change
Add new condition for a bit more complex setups as array.
Commenting
The idea code is just an example for describing the idea, this issue could be used to discuss if any potential problem of this change and recommendations.
The text was updated successfully, but these errors were encountered: