@@ -33,6 +33,14 @@ class User extends Authenticatable
|
||||
'remember_token',
|
||||
];
|
||||
|
||||
protected $settings = [
|
||||
'text_color',
|
||||
'background_color',
|
||||
'font',
|
||||
'font_size',
|
||||
'line_spacing',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast.
|
||||
*
|
||||
@@ -41,4 +49,17 @@ class User extends Authenticatable
|
||||
protected $casts = [
|
||||
'email_verified_at' => 'datetime',
|
||||
];
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getSettings()
|
||||
{
|
||||
$settings = [];
|
||||
foreach ($this->settings as $setting) {
|
||||
$settings[$setting] = $this->{$setting};
|
||||
}
|
||||
|
||||
return $settings;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user