mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2025-02-07 14:26:44 +01:00
Convert deprecated $dates
property to $casts
This commit is contained in:
parent
3b2d58b77f
commit
40ead10cd8
5 changed files with 8 additions and 7 deletions
|
@ -59,7 +59,7 @@ class Activity extends Model
|
|||
use SoftDeletes;
|
||||
|
||||
public $timestamps = false;
|
||||
protected $dates = ['created_at'];
|
||||
|
||||
protected $fillable = ['created_at', 'user_id', 'activity_type', 'resource_type', 'resource_id'];
|
||||
protected $appends = ['url', 'thumbnail_url', 'human_friendly_resource_type'];
|
||||
protected $casts = [
|
||||
|
|
|
@ -52,7 +52,7 @@ use Illuminate\Support\Facades\Request;
|
|||
class ResourceLogItem extends Model
|
||||
{
|
||||
public $timestamps = false;
|
||||
protected $dates = ['created_at'];
|
||||
|
||||
|
||||
const VIEW = 1;
|
||||
const DOWNLOAD = 2;
|
||||
|
|
|
@ -154,11 +154,10 @@ class Track extends Model implements Searchable, Commentable, Favouritable
|
|||
|
||||
protected $elasticsearchType = 'track';
|
||||
|
||||
protected $dates = [
|
||||
'published_at', 'released_at',
|
||||
];
|
||||
protected $hidden = ['original_tags', 'metadata'];
|
||||
protected $casts = [
|
||||
'published_at' => 'datetime',
|
||||
'released_at' => 'datetime',
|
||||
'id' => 'integer',
|
||||
'user_id' => 'integer',
|
||||
'license_id' => 'integer',
|
||||
|
|
|
@ -67,8 +67,9 @@ class TrackFile extends Model
|
|||
const STATUS_PROCESSING_PENDING = 3;
|
||||
|
||||
protected $appends = ['is_expired'];
|
||||
protected $dates = ['expires_at'];
|
||||
|
||||
protected $casts = [
|
||||
'expires_at' => 'datetime',
|
||||
'id' => 'integer',
|
||||
'track_id' => 'integer',
|
||||
'is_master' => 'boolean',
|
||||
|
|
|
@ -110,6 +110,7 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
|
|||
|
||||
protected $elasticsearchType = 'user';
|
||||
protected $casts = [
|
||||
'disabled_at' => 'datetime',
|
||||
'id' => 'integer',
|
||||
'sync_names' => 'boolean',
|
||||
'uses_gravatar' => 'boolean',
|
||||
|
@ -120,7 +121,7 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
|
|||
'is_archived' => 'boolean',
|
||||
'redirect_to' => 'integer',
|
||||
];
|
||||
protected $dates = ['created_at', 'updated_at', 'disabled_at'];
|
||||
|
||||
protected $hidden = ['disabled_at', 'remember_token'];
|
||||
|
||||
public function scopeUserDetails($query)
|
||||
|
|
Loading…
Reference in a new issue