$documents->getRouteKey(), 'key' => [ 'public' => $documents->getPublicKey(), 'route' => $documents->getRouteKey(), ], 'documentable_id' => $documents->documentable_id, 'documentable_type' => $documents->documentable_type, 'type' => $documents->type, 'title' => $documents->title, 'description' => $documents->description, 'expiry_date' => $documents->expiry_date, 'files' => $documents->files, 'user_type' => $documents->user_type, 'user_id' => $documents->user_id, 'deleted_at' => $documents->deleted_at, 'url' => [ 'public' => trans_url('document/'.$documents->getPublicKey()), 'user' => guard_url('document/documents/'.$documents->getRouteKey()), ], 'status' => trans('app.'.$documents->status), 'created_at' => format_date($documents->created_at), 'updated_at' => format_date($documents->updated_at), ]; } }