feat: add image_id for template
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user