Skip to content

Commit cc795fa

Browse files
committed
fix translations
1 parent d43503e commit cc795fa

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

src/Models/Medium.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Cone\Root\Traits\InteractsWithProxy;
1616
use Illuminate\Database\Eloquent\Attributes\Scope;
1717
use Illuminate\Database\Eloquent\Builder;
18+
use Illuminate\Database\Eloquent\Casts\AsArrayObject;
1819
use Illuminate\Database\Eloquent\Casts\Attribute;
1920
use Illuminate\Database\Eloquent\Concerns\HasUuids;
2021
use Illuminate\Database\Eloquent\Factories\HasFactory;
@@ -161,12 +162,12 @@ public static function fromPath(string $path, array $attributes = []): static
161162
/**
162163
* Get the attributes that should be cast.
163164
*
164-
* @return array{'properties':'json'}
165+
* @return array{'values':'\Illuminate\Database\Eloquent\Casts\AsArrayObject'}
165166
*/
166167
protected function casts(): array
167168
{
168169
return [
169-
'properties' => 'json',
170+
'properties' => AsArrayObject::class,
170171
];
171172
}
172173

src/Models/Translation.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ class Translation extends Model implements Contract
1717
use HasFactory;
1818
use InteractsWithProxy;
1919

20+
/**
21+
* The attributes that should have default values.
22+
*
23+
* @var array<string, string>
24+
*/
25+
protected $attributes = [
26+
'values' => '[]',
27+
];
28+
2029
/**
2130
* The attributes that are mass assignable.
2231
*

src/Root.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class Root
2727
*
2828
* @var string
2929
*/
30-
public const string VERSION = '2.7.18';
30+
public const string VERSION = '2.7.19';
3131

3232
/**
3333
* The registered booting callbacks.

0 commit comments

Comments
 (0)