please I need help
Feb 28, 2024
13
Level 1
show data from different table
How can I retrieve (first name, last name) from the trainee table and (student status, company, start date, end date) from the EmployeeLog table, ensuring that all the data matches the academy_id and cohort_id?
"academy_id" and "cohort_id" are sent from welcome.blade.php.
<td><a class="btn btn-primary btn-sm" href="{{ route('traineeLog.index', ['academy_id' => $info['academy_id'],'cohort_id' => $info['Cohort']]) }}">Trainees Log</a></td>
web.php
Route::get('/traineLog/{academy_id}/{cohort_id}', [TraineeController::class, 'traineeLog'])->name('traineeLog.index');
TraineeController.php
public function traineeLog($academy_id,$cohort_id)
{
//
How can I retrieve data from both the trainee table and the employeeLog table, and then send it for viewing?
return view('employment-status.employment_log_status',compact('data'));
}
Please or to participate in this conversation.