Skip to content

Commit

Permalink
Merge branch 'master' into Slim-skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
realodix committed Mar 17, 2024
2 parents acb9c6d + 7a282e4 commit 1c2d9d8
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 17 deletions.
15 changes: 9 additions & 6 deletions app/Models/Url.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,17 @@ class Url extends Model
];

/**
* The attributes that should be cast to native types.
* Get the attributes that should be cast.
*
* @var array<string, string>
* @return array<string, string>
*/
protected $casts = [
'user_id' => 'integer',
'is_custom' => 'boolean',
];
protected function casts(): array
{
return [
'user_id' => 'integer',
'is_custom' => 'boolean',
];
}

/*
|--------------------------------------------------------------------------
Expand Down
15 changes: 9 additions & 6 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,17 @@ 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 = [
'email_verified_at' => 'datetime',
'password' => 'hashed',
];
protected function casts(): array
{
return [
'email_verified_at' => 'datetime',
'password' => 'hashed',
];
}

/*
|--------------------------------------------------------------------------
Expand Down
13 changes: 8 additions & 5 deletions app/Models/Visit.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,16 @@ class Visit extends Model
];

/**
* The attributes that should be cast to native types.
* Get the attributes that should be cast.
*
* @var array<string, string>
* @return array<string, string>
*/
protected $casts = [
'is_first_click' => 'boolean',
];
protected function casts(): array
{
return [
'is_first_click' => 'boolean',
];
}

/*
|--------------------------------------------------------------------------
Expand Down

0 comments on commit 1c2d9d8

Please sign in to comment.