« first day (2234 days earlier)      last day (706 days later) » 

10:23
extension Object{//Retrive model objects from realm database
@discardableResult
func retriveModel<T: Object>(type: T.Type) -> [T] {
do {
let realm = try Realm()
return realm.objects(T.self).toArray(ofType: T.self)
} catch let error as NSError {
fatalError(error.localizedDescription)
}
}}
i want to use this in my viewController
?

« first day (2234 days earlier)      last day (706 days later) »