CourseWork/app/Services/JournalService.php

20 lines
400 B
PHP
Raw Normal View History

2024-06-23 00:57:29 +04:00
<?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();
}
}