😅Chú ý cách lấy ảnh thumb (ok)
Last updated
Last updated
C:\xampp82\htdocs\testnet\resources\views\tickets\show.blade.php
@extends('layouts.main')
@section('main')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-10">
@if(session('status'))
<div class="alert alert-success" role="alert">
{{ session('status') }}
</div>
@endif
<div class="card">
<div class="card-header">Ticket #{{ $ticket->id }}</div>
<div class="card-body">
<div class="mb-2">
<table class="table table-bordered table-striped">
<tbody>
<tr>
<th>
{{ trans('cruds.ticket.fields.title') }}
</th>
<td>
{{ $ticket->title }}
</td>
</tr>
<tr>
<th>
{{ trans('cruds.ticket.fields.attachments') }}
</th>
<td>
@foreach($ticket->attachments as $attachment)
<a href="{{ $attachment->getUrl() }}">
<img src="{{ $attachment->getUrl('thumb') }}" alt="{{ $attachment->name }}">
</a>
@endforeach
</td>
</tr>
</tbody>
</table>
</div>
<a class="btn btn-default my-2" href="{{ route('tickets.index') }}">
{{ trans('global.back_to_list') }}
</a>
<a href="{{ route('tickets.edit', $ticket->id) }}" class="btn btn-primary">
@lang('global.edit') @lang('cruds.ticket.title_singular')
</a>
</div>
</div>
</div>
</div>
</div>
@endsection