@extends($_layout.'main') {{-- khai báo title --}} @section('title', "Cấu hình Style") {{-- tên modul xuất hiện trong sub header --}} @section('module.name', "Menu") @section('content')
@include($_base.'forms.form', [ 'inputs' => $inputs, 'data' => $data, 'config' => [ 'save_button_text' => 'Lưu', 'cancel_button_text' => 'Hủy', 'form_group_options' => [ 'group_class' => '', 'label_class' => '', 'wrapper_class' => '' ], 'form_group_style' => 'custom', 'log_style' => true, ], 'attrs' => [ 'method' => 'post', 'action' => route('admin.style-sets.personal.config.save'), 'id' => 'config-form', ] ])

Item Mẫu

@foreach ($items as $item)
@php $itemInp = $itemInputs; $itemInp['id'] = [ 'type' => 'hidden', 'value' => $item->id, 'id' => 'hidden-' . $item->id ]; @endphp @include($_base.'forms.form', [ 'inputs' => $itemInp, 'data' => $item->toArray(), 'config' => [ 'button_block_type' => 2, 'save_button_text' => 'Cập nhật', 'cancel_button_text' => 'Xóa', 'cancel_button_class' => 'danger btn-delete-item', 'cancel_button_url' => route('admin.style-sets.personal.config.delete-item'), 'form_group_options' => [ 'group_class' => '', 'label_class' => '', 'wrapper_class' => '' ], 'form_group_style' => 'custom', 'log_style' => true, ], 'attrs' => [ 'method' => 'post', 'class' => 'style-item-config-update-form', 'data-id' => $item->id, 'action' => route('admin.style-sets.personal.config.update-item'), 'id' => 'update-style-item-config-form-' . $item->id, ] ])
@endforeach
@include($_base.'forms.form', [ 'inputs' => $itemInputs, 'data' => [], 'config' => [ 'save_button_text' => 'Thêm', 'cancel_button_text' => 'Hủy', 'form_group_options' => [ 'group_class' => '', 'label_class' => '', 'wrapper_class' => '' ], 'form_group_style' => 'custom', 'log_style' => true, ], 'attrs' => [ 'method' => 'post', 'action' => route('admin.style-sets.personal.config.create-item'), 'id' => 'create-style-item-config-form', ] ])

Xem Trước

@php $preview = crazy_arr($data); $width = old('width',$preview->width(340)); $height = old('height',$preview->height(500)); $bg = $preview->avatar_url(asset('static/images/default.png')); @endphp
@if ($items && count($items)) @foreach ($items as $item) @php $arrItem = new \Gomee\Helpers\Arr($item->toArray()); $itemWidth = $arrItem->get('preview_config.width', $width/2); $itemHeight = $arrItem->get('preview_config.height', $itemWidth/2); $itemTop = $arrItem->get('preview_config.top', ($height-$itemHeight)/2); $itemLeft = $arrItem->get('preview_config.left', ($width-$itemWidth)/2); @endphp
{{$item->name}}
@endforeach @endif
@endsection