Ресурсы API - Призыв к неопределенному методу :: ToArray ()

SWIFT 4

extension String {

mutating func toHtmlEncodedString() {
    guard let encodedData = self.data(using: .utf8) else {
        return
    }

    let attributedOptions: [NSAttributedString.DocumentReadingOptionKey : Any] = [
        NSAttributedString.DocumentReadingOptionKey(rawValue: NSAttributedString.DocumentAttributeKey.documentType.rawValue): NSAttributedString.DocumentType.html,
        NSAttributedString.DocumentReadingOptionKey(rawValue: NSAttributedString.DocumentAttributeKey.characterEncoding.rawValue): String.Encoding.utf8.rawValue
    ]

    do {
        let attributedString = try NSAttributedString(data: encodedData, options: attributedOptions, documentAttributes: nil)
        self = attributedString.string
    } catch {
        print("Error: \(error)")

    }
}
0
задан FreeLancer 5 March 2019 в 00:42
поделиться

1 ответ

В вашем $ inboxtype = .... отсутствует -> get (). Так и должно быть:

$inboxtype =   Messages::where('receiver_id', $user_id)
               ->with('sender')
               ->with(['bookings' => function($query) {
                            $query->with('currency');
                        }])
               ->with('item_address')
               ->orderBy('id','desc')
               ->get();
0
ответ дан Jose Henrique Felipetto 5 March 2019 в 00:42
поделиться
Другие вопросы по тегам:

Похожие вопросы: