public function traineeRecord($id)
{
// Load the user and its trainee relationship
$trainee = User::with('trainee')->findOrFail($id);
// Pass the $trainee variable to the view
return view('coordinator.trainee-records', compact('trainee'));
}
@endsection [/code] [b]Контроллер:[/b] [code]public function traineeRecord($id) { // Load the user and its trainee relationship $trainee = User::with('trainee')->findOrFail($id);
// Pass the $trainee variable to the view return view('coordinator.trainee-records', compact('trainee')); } [/code] [b]Маршрут:[/b] [code]Route::get('/trainee-records/{id}', [CoordinatorController::'traineeRecord']) ->name('coordinator.trainee-records'); [/code] Все на месте, но все равно не работает. Я уже пробовал очистить кеш.