Check that the user has assets and that the aset model is valid
This commit is contained in:
parent
444e250609
commit
0e93495ca2
1 changed files with 3 additions and 1 deletions
|
@ -340,10 +340,11 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@if ($user->assets)
|
||||||
@foreach ($user->assets as $asset)
|
@foreach ($user->assets as $asset)
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@if ($asset->physical=='1')
|
@if (($asset->model) && ($asset->physical=='1'))
|
||||||
<a href="{{ route('models.show', $asset->model->id) }}">{{ $asset->model->name }}</a>
|
<a href="{{ route('models.show', $asset->model->id) }}">{{ $asset->model->name }}</a>
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
|
@ -360,6 +361,7 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
@endif
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue