TrainingRepository.php 510 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace App\Repositories;
  3. use App\Models\Training;
  4. use App\Models\Sentence;
  5. class TrainingRepository extends GameRepository {
  6. public function __construct(Training $training)
  7. {
  8. $this->game = $training;
  9. }
  10. protected function get_sentences($user_id)
  11. {
  12. return Sentence::join('corpora', 'corpora.id', '=', 'sentences.corpus_id')
  13. ->select('sentences.*')
  14. ->where('corpora.is_training', 1)
  15. ->get();
  16. }
  17. }