26 lines
500 B
PHP
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(),
|
|
]);
|
|
}
|
|
}
|