*/ protected $fillable = [ 'name', 'email', 'password', ]; /** * The attributes that should be hidden for serialization. * * @var array */ protected $hidden = [ 'password', 'remember_token', ]; protected $settings = [ 'text_color', 'background_color', 'font', 'font_size', 'line_spacing', ]; /** * The attributes that should be cast. * * @var array */ protected $casts = [ 'email_verified_at' => 'datetime', ]; /** * @return array */ public function getSettings() { $settings = []; foreach ($this->settings as $setting) { $settings[$setting] = $this->{$setting}; } return $settings; } }