feat: add breath colors

This commit is contained in:
2026-06-16 18:52:25 +03:30
parent 81ac4a896f
commit 42f3808343
9 changed files with 206 additions and 8 deletions
+6 -1
View File
@@ -8,12 +8,17 @@
class BreathingTemplate extends Model
{
use HasSaves;
protected $fillable = ['user_id', 'name', 'inhale', 'exhale', 'breath_hold' , 'duration' , 'description','image_id' , 'source'];
protected $fillable = ['user_id', 'name', 'inhale', 'exhale', 'breath_hold' , 'duration' , 'description','image_id' , 'source', 'breathing_color_id'];
public function user()
{
return $this->belongsTo(User::class);
}
public function breathingColor()
{
return $this->belongsTo(BreathingColor::class);
}
protected $appends = ['image_url', 'is_saved','saved_count'];
public function getImageUrlAttribute()