attributes with json not set locale #419
Unanswered
MwSpaceLLC
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
Today we test this awesome package.
So for use it, with setLocale, but the query return json, not input translate:
example
result:
Illuminate\Pagination\LengthAwarePaginator {#623 ▼ // packages\mwspace\admin\src\Controllers\Core\ProductController.php:24
#items: Illuminate\Database\Eloquent\Collection {#618 ▼
#items: array:1 [▼
0 => MwSpace\Admin\Models\Product {#614 ▼
#connection: "mysql"
#table: "mwspace_products"
#primaryKey: "id"
#keyType: "int"
+incrementing: true
#with: []
#withCount: []
+preventsLazyLoading: false
#perPage: 15
+exists: true
+wasRecentlyCreated: false
#escapeWhenCastingToString: false
#attributes: array:11 [▼
"id" => 1
"slug" => "{"it":"products"}"
"name" => "{"it":"products"}"
"title" => "{"it":"products"}"
"description" => "{"it":"products"}"
"content" => "{"it":null}"
"price" => null
"enabled" => 0
"created_at" => "2023-09-28 12:12:01"
"updated_at" => "2023-09-28 12:12:01"
"deleted_at" => null
]
#original: array:11 [▶]
#changes: []
#casts: []
#classCastCache: []
#attributeCastCache: []
#dateFormat: null
#appends: []
#dispatchesEvents: []
#observables: []
#relations: array:1 [▶]
#touches: []
+timestamps: true
+usesUniqueIds: false
#hidden: []
#visible: []
#fillable: array:7 [▶]
#guarded: array:1 [▶]
+translatable: array:5 [▶]
#translationLocale: null
}
]
#escapeWhenCastingToString: false
}
#perPage: 15
#currentPage: 1
#path: "http://127.0.0.1:8000/it/mwspace/products"
#query: []
#fragment: null
#pageName: "page"
+onEachSide: 3
#options: array:2 [▶]
#total: 1
#lastPage: 1
}
Beta Was this translation helpful? Give feedback.
All reactions