Image displaying continue

This commit is contained in:
Александр Бабкин
2022-07-14 22:45:19 +03:00
parent 36698241ed
commit cce02034f4
5 changed files with 120 additions and 88 deletions

View File

@@ -0,0 +1,5 @@
@php
$filePath = $project->mmc_path . '/' . $auk->auk_path . '/' . $auk->image_dir . '/' . $mmc->filename;
$svg = file_get_contents($filePath);
@endphp
{{ $svg }}

View File

@@ -49,8 +49,20 @@
<td class="p-1 border border-gray-200 text-xs">
{{ date('d.m.Y H:i:s', $mmc['mtime']) }}</td>
<td>
<img height="50"
src="{{ 'file://' . $project->mmc_path . '/' . $top_auk->auk_path . '/' . $top_auk->image_dir . '/' . $mmc->filename }}">
@if (strcasecmp(substr($mmc->filename, -3, 3), 'jpg') == 0)
<img height="50"
src="{{ route('mmc.show', $mmc->id) }}">
@endif
@if (strcasecmp(substr($mmc->filename, -3, 3), 'svg') == 0)
<svg>
@include('components.svg', [
'project' => $project,
'auk' => $top_auk,
'mmc' => $mmc,
])
</svg>
@endif
{{-- <img height="50" src="{{ route('mmc.show', $mmc->id) }}"> --}}
</td>
</tr>