mirror of
https://github.com/rico-vz/HeimerdingerLoL.git
synced 2025-12-06 10:10:48 +01:00
Convert $casts property to method
This commit is contained in:
@@ -29,9 +29,12 @@ class Champion extends Model
|
|||||||
'release_patch',
|
'release_patch',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $casts = [
|
protected function casts(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
'roles' => 'array',
|
'roles' => 'array',
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
public function getResourceTypeAttribute($value): string
|
public function getResourceTypeAttribute($value): string
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,9 +16,12 @@ class ChampionRoles extends Model
|
|||||||
'roles',
|
'roles',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $casts = [
|
protected function casts(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
'roles' => 'array',
|
'roles' => 'array',
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
public function champion(): BelongsTo
|
public function champion(): BelongsTo
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -34,11 +34,14 @@ class ChampionSkin extends Model
|
|||||||
'splash_artist',
|
'splash_artist',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $casts = [
|
protected function casts(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
'associated_skinline' => 'array',
|
'associated_skinline' => 'array',
|
||||||
'voice_actor' => 'array',
|
'voice_actor' => 'array',
|
||||||
'splash_artist' => 'array',
|
'splash_artist' => 'array',
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
public function sluggable(): array
|
public function sluggable(): array
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,7 +17,10 @@ class ContactSubmission extends Model
|
|||||||
'message',
|
'message',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $casts = [
|
protected function casts(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
'category' => ContactCategory::class,
|
'category' => ContactCategory::class,
|
||||||
];
|
];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,9 +20,12 @@ class SkinChroma extends Model
|
|||||||
'chroma_image',
|
'chroma_image',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $casts = [
|
protected function casts(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
'chroma_colors' => 'array',
|
'chroma_colors' => 'array',
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
public function sluggable(): array
|
public function sluggable(): array
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -22,9 +22,12 @@ class SummonerIcon extends Model
|
|||||||
'esports_event',
|
'esports_event',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $casts = [
|
protected function casts(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
'legacy' => 'boolean',
|
'legacy' => 'boolean',
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
|
||||||
public function sluggable(): array
|
public function sluggable(): array
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -37,12 +37,15 @@ class User extends Authenticatable
|
|||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The attributes that should be cast.
|
* Get the attributes that should be cast.
|
||||||
*
|
*
|
||||||
* @var array<string, string>
|
* @return array<string, string>
|
||||||
*/
|
*/
|
||||||
protected $casts = [
|
protected function casts(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
'email_verified_at' => 'datetime',
|
'email_verified_at' => 'datetime',
|
||||||
'password' => 'hashed',
|
'password' => 'hashed',
|
||||||
];
|
];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user