Skip to content

Commit

Permalink
Merge pull request #469 from LorenzoSapora/patch-3
Browse files Browse the repository at this point in the history
Fix forceFill issue
  • Loading branch information
toonvandenbos authored Jul 6, 2023
2 parents 274dc38 + 48f2e0a commit a40f885
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Concerns/HasFlexible.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@

use Illuminate\Support\Collection as BaseCollection;
use Laravel\Nova\NovaServiceProvider;
use Laravel\Nova\Support\Fluent;
use Whitecube\NovaFlexibleContent\Layouts\Collection;
use Whitecube\NovaFlexibleContent\Layouts\Layout;
use Whitecube\NovaFlexibleContent\Value\FlexibleCast;


trait HasFlexible
{
/**
Expand Down Expand Up @@ -120,7 +122,7 @@ protected function getMappedLayout($item, array $layoutMapping)
$name = $item['layout'] ?? null;
$key = $item['key'] ?? null;
$attributes = (array) ($item['attributes'] ?? []);
} elseif (is_a($item, \stdClass::class)) {
} elseif (is_a($item, Fluent::class)) {
$name = $item->layout ?? null;
$key = $item->key ?? null;
$attributes = (array) ($item->attributes ?? []);
Expand Down

0 comments on commit a40f885

Please sign in to comment.