favorites
This commit is contained in:
@@ -40,4 +40,9 @@ class Workout extends Model
|
||||
->withTimestamps()
|
||||
->orderBy('workout_exercises.position');
|
||||
}
|
||||
|
||||
public function favoritedBy()
|
||||
{
|
||||
return $this->belongsToMany(User::class, 'workout_favorites')->withTimestamps();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user