feat: add image_id for template

This commit is contained in:
2025-09-26 12:13:38 +03:30
parent 535e73c4c9
commit 8ca4085b86
4 changed files with 78 additions and 21 deletions
+6 -1
View File
@@ -6,7 +6,7 @@
class BreathingTemplate extends Model
{
protected $fillable = ['user_id', 'name', 'inhale', 'exhale', 'breath_hold' , 'duration' , 'description'];
protected $fillable = ['user_id', 'name', 'inhale', 'exhale', 'breath_hold' , 'duration' , 'description','image_id'];
public function user()
{
@@ -17,4 +17,9 @@ public function sessions()
{
return $this->hasMany(UserBreathingSession::class, 'template_id');
}
public function image()
{
return $this->belongsTo(Image::class);
}
}