edit.blade.php
1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
@extends('layout.admin', ['title' => 'Редактирование товара'])
@section('content')
<div class="profile-block-wrapper">
<div class="profile-block">
<h2 class="modal-auth__title">
Редактирование товара
</h2>
<form method="post" enctype="multipart/form-data" class="modal-auth-form" action="{{ route('admin.goods.update', ['good' => $good->id]) }}">
@include('admin.goods.form')
</form>
<h3>Дополнительные картинки</h3>
<a style="color:green" href="{{ route ('admin.img.good', ['good' => $good->id]) }}">Добавить картинку в галерею</a>
<table class="table" style="width: 100%">
<thead>
<tr>
<th>ID</th>
<th>Фото</th>
<th>Действия</th>
</tr>
</thead>
<tbody>
@if ($good->images->count())
@foreach($good->images as $img)
<tr>
<td><?=$img->id?></td>
<td><img src="<?=asset(Storage::url($img->image))?>" width="100px"/></td>
<td><a href="{{ route('admin.img.del.good', ['id'=> $img->id, 'good' => $good->id]) }}">Удалить</a></td>
</tr>
@endforeach
@else
<tr>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
@endif
</tbody>
</table>
</div>
</div>
@endsection