$layout = (new \Xibo\OAuth2\Client\Entity\XiboLayout($entityProvider))->create(‘testf’, ‘test’, ‘’, 1);
$layoutDraft = (new \Xibo\OAuth2\Client\Entity\XiboLayout($entityProvider))->getById($layout->layoutId, 'regions,playlists,widgets');
$layoutDraft1 = (new \Xibo\OAuth2\Client\Entity\XiboLayout($entityProvider))->checkout($layoutDraft->layoutId);
$regions = $layoutDraft1->regions;
$region = $regions[0];
$region_playlistId = $region->regionPlaylist->playlistId;
$media = [$media_id];
$playlist = (new \Xibo\OAuth2\Client\Entity\XiboPlaylist($entityProvider))->assign($media, 10, $region_playlistId);
$layout1 = $layoutDraft1->publish($layoutDraft1->layoutId);
This is my code to create layout, assign the media to region(from media library).
But when I check the dashboard, layout status is still draft.
Please help me how to fix this problem.
Thank you