CourseWork/app/Services/JournalService.php
2024-06-20 12:27:05 +04:00

20 lines
400 B
PHP

<?php
namespace App\Services;
use App\Models\Grade;
use App\Models\Subject;
use Illuminate\Support\Facades\DB;
class JournalService
{
public function getLessons(Grade $grade, Subject $subject)
{
return DB::table('lessons')
->where('grade_id', $grade->id)
->where('subject_id', $subject->id)
->orderBy('lesson_date')
->get();
}
}