*/ public static function execute(SocialAccount $account): array { $boards = app(PinterestPublisher::class)->getBoards($account); return Collection::make($boards) ->map(fn (mixed $board): array => [ 'id' => (string) data_get($board, 'id'), 'name' => (string) data_get($board, 'name'), ]) ->filter(fn (array $board): bool => $board['id'] !== '') ->values() ->all(); } }