mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-01-11 16:58:58 +01:00
Cast model attributes that should be integer
This commit is contained in:
parent
d571d6a429
commit
13dc8b75e5
@ -32,6 +32,16 @@ class Group extends Model
|
||||
protected $hidden = ['created_at', 'updated_at'];
|
||||
|
||||
|
||||
/**
|
||||
* The attributes that should be cast.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $casts = [
|
||||
'twofaccounts_count' => 'integer',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* Get the TwoFAccounts of the group.
|
||||
*/
|
||||
|
@ -52,6 +52,17 @@ class TwoFAccount extends Model implements Sortable
|
||||
protected $hidden = ['token', 'uri', 'secret', 'algorithm', 'created_at', 'updated_at'];
|
||||
|
||||
|
||||
/**
|
||||
* The attributes that should be cast.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $casts = [
|
||||
'group_id' => 'integer',
|
||||
'order_column' => 'integer',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* An OTP object from package Spomky-Labs/otphp
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user