20 lines
400 B
PHP
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();
|
||
|
}
|
||
|
}
|