@php
use App\Helpers\Template as Template;
use App\Helpers\Hightlight as Hightlight;
@endphp
| # |
Article Info |
Thumb |
Category |
Kiểu bài viết |
Trạng thái |
{{-- Tạo mới |
Chỉnh sửa | --}}
Hành động |
@if (count($items) > 0)
@foreach ($items as $key => $val)
@php
$index = $key + 1;
$class = ($index % 2 == 0) ? "even" : "odd";
$id = $val['id'];
$name = Hightlight::show($val['name'], $params['search'], 'name');
$content = Hightlight::show($val['content'], $params['search'], 'content');
$thumb = Template::showItemThumb($controllerName, $val['thumb'], $val['name']);
$fieldName = 'changeCategory';
$link = route($controllerName . '/' . $fieldName, ['category_id' => 'value_new', 'id' => $id]);
$categoryName = Form::select('select_change_attr', $itemsCategory, @$val['category_id'], ['class' => "form-control ", 'data-url' => $link]);
$status = Template::showItemStatus($controllerName, $id, $val['status']);
$type = Template::showItemSelect($controllerName, $id, $val['type'], 'type');
// $createdHistory = Template::showItemHistory($val['created_by'], $val['created']);
// $modifiedHistory = Template::showItemHistory($val['modified_by'], $val['modified']);
$listBtnAction = Template::showButtonAction($controllerName, $id);
@endphp
| {{ $index }} |
Name: {!! $name !!}
Content: {!! $content !!}
|
{!! $thumb !!}
|
{!! $categoryName !!} |
{!! $type !!} |
{!! $status !!} |
{{-- {!! $createdHistory !!} |
{!! $modifiedHistory !!} | --}}
{!! $listBtnAction !!} |
@endforeach
@else
@include('admin.templates.list_empty', ['colspan' => 6])
@endif