Image displaying continue
This commit is contained in:
5
resources/views/components/svg.blade.php
Normal file
5
resources/views/components/svg.blade.php
Normal 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 }}
|
||||
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user