The admin of the application has access to list each projects of a user. Write now I am able to list the projects but they all are listed together no matter the unique id of the URL.
// Admin form case controller
public function adminforms (Project $project){
$users = User::get();
return view('smiledesign.adminforms', compact('users', 'project'));
}
///Records controller
public function records(user $users, project $project){
$project = project::get();
$users = user::get();
return view ('/smiledesign/records' , compact( 'users','project'));
}
<table class="table">
<thead>
<tr>
<th>Dr Name</th>
<th>User Id</th>
<th>Email</th>
</tr>
</thead>
<tbody>
@foreach ($users as $user)
<tr>
<td> <a href="/smiledesign//records"></a></td>
<td> <a href="/smiledesign//records"></a></td>
<td> <a href="/smiledesign//records"></a></td>
</tr>
</tbody>
@endforeach
</table>
// Records view
<table class="table table-striped table-bordered" id="table_id">
<thead>
<tr>
<th>Case Number</th>
<th>Case Form</th>
<th>Patient Name</th>
<th>Date Created</th>
<th>Status</th>
</tr>
</thead>
@foreach ($project as $project)
<tbody>
<tr>
<td> <a href="/smiledesign//show"></a></td>
@if ($project->services0)
<td> <a href="/smiledesign//show"></a></td>
@elseif ($project->services1)
<td> <a href="/smiledesign//show"></a></td>
@elseif ($project->services2)
/show"></a></td> --}}
<td> <a href="/smiledesign//show"></a></td>
@endif
<td> <a href="/smiledesign//show"></a></td>
<td> <a href="/smiledesign//show"></a></td>
<td> <a href="/smiledesign//show"></a></td>
</tr>
</tbody>
@endforeach
</table>
What I wanna see is each project of a specific user when I click The link from the adminforms user. Instead, every link I go I see all projects of all users
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire