Skip to content

Commit

Permalink
consentable casts update
Browse files Browse the repository at this point in the history
  • Loading branch information
AravindRam-Ranium committed Feb 20, 2024
1 parent 90cb585 commit 3aacd97
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Models/ConsentOptionUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ class ConsentOptionUser extends MorphPivot

protected $table = 'consentables';

/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
'fields' => 'array'
];

public static function getAllSavedUserTypes(): array
{
return self::query()->select('consentable_type')->distinct()->pluck('consentable_type')->toArray();
Expand Down

0 comments on commit 3aacd97

Please sign in to comment.