CourseWork/app/Http/Controllers/ScoreController.php
2024-05-17 18:46:12 +04:00

26 lines
500 B
PHP

<?php
namespace App\Http\Controllers;
use App\Enums\ScoreEnum;
use App\Models\Lesson;
use App\Services\ServiceInterface;
class ScoreController extends Controller
{
public function __construct(
protected ServiceInterface $service,
){
}
public function show(Lesson $lesson)
{
return view('scores.show', [
'students' => $this->service->getAll($lesson),
'lesson' => $lesson,
'scores' => ScoreEnum::cases(),
]);
}
}