🚧 Commence la personnalisation de l'affichage des pages

Pour #12
This commit is contained in:
2022-04-19 16:55:18 +02:00
parent 2c56eb91af
commit 1dca0951e8
18 changed files with 695 additions and 24 deletions

View File

@@ -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;
}
}