Skip to content

Commit

Permalink
Merge pull request #3 from AuroraWebSoftware/all-shapes
Browse files Browse the repository at this point in the history
All shapes
  • Loading branch information
emreakay authored Sep 30, 2024
2 parents 149b2f5 + 1298b06 commit be51ea4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Traits/Flexy.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,13 @@ public function flexy(): Attribute
$this->fields->_model_type = static::getModelType();
$this->fields->_model_id = $this->id;

$values = Value::leftJoin('ff_shapes', 'ff_values.model_type', '=', 'ff_shapes.model_type')
->where(
[
'ff_values.model_type' => static::getModelType(),
'ff_values.model_id' => $this->id,
]
)->orderBy('ff_shapes.sort')->get();
// leftJoin('ff_shapes', 'ff_values.model_type', '=', 'ff_shapes.model_type')
$values = Value::where(
[
'ff_values.model_type' => static::getModelType(),
'ff_values.model_id' => $this->id,
]
)->get();

$values->each(function ($value) {
$this->fields[$value->field_name] =
Expand Down

0 comments on commit be51ea4

Please sign in to comment.