@extends('admin.layouts.base') @section('title', 'Create Product') @section('content')
@php $as_insert_form = true; $editOrNew = 'New'; $method = 'PUT'; $url = [env('cms_base_url').'/Banner']; if (isset($id) && $id != '') { $url = [env('cms_base_url').'/Banner/' . $id]; $as_insert_form = false; $editOrNew = 'Edit'; } if (isset($as_duplicate) && $as_duplicate == true) { $url = [env('cms_base_url').'/Banner']; } $back_url = ''; if (request()->__back && request()->__back != '') { $back_url = base64_decode(request()->__back); } $_breadcrumb = [ 'Home' => '', 'Banner' => $back_url != '' ? $back_url : route('generic.list', 'Banner'), $editOrNew => '', ]; @endphp @section('toolbar')

{{ ($as_insert_form == true ? 'New' : 'Edit') . ' Banner' }}

@include('admin.layouts.layout._breadcrumb')
@endsection
{{ Form::open(['url' => $url, 'id' => 'form1', 'files' => true, 'method' => $method]) }} Create Banner
{{ Form::field('text', 'name', isset($values['name']) ? $values['name'] : '', [], ['layout' => 'v']) }}
{{ Form::label('language', Ui::prettify(__('ui.' . 'language')), ['class' => 'col-form-label']) }} {{ Form::select('locale', $locales, isset($values['locale']) ? $values['locale'] : [], array_merge(['class' => 'form-select', 'layout' => 'v'])) }}
{{ Form::field('radio', 'banner_type_id', isset($values['banner_type_id']) ? $values['banner_type_id'] : '', $main_types, ['layout' => 'v']) }}
{{ Form::field('radio', 'link_type', isset($values['link_type']) ? $values['link_type'] : '', $link_types, ['layout' => 'v', 'inline' => false]) }}
{{ Form::field('text', 'external_link', isset($values['external_link']) ? $values['external_link'] : '', [], ['layout' => 'v']) }}
@php $internal_links = []; if (isset($values['internal_link']) && $values['internal_link'] != '') { $internal_links = \App\Models\Seo::where('id', $values['internal_link']) ->pluck('title', 'id') ->toArray(); } @endphp {{ Form::field('select', 'internal_link', isset($values['internal_link']) ? $values['internal_link'] : '', $internal_links, ['layout' => 'v']) }}
{{ Form::field('text', 'text_label', isset($values['text_label']) ? $values['text_label'] : '', [], ['layout' => 'v']) }}

Screen

{{ Form::field('file_manager', 'photo', isset($values['photo']) && $values['photo'] ? $values['photo'] : '', [], ['layout' => 'v', 'rows' => 159]) }}
@foreach ($photo_sizes as $type => $photo_size) {!! $photo_size !!} @endforeach
{{ Form::field('tinymce', 'brief', isset($values['brief']) ? $values['brief'] : '', [], ['layout' => 'v']) }} {{ Form::field('select', 'position_text', isset($values['position_text']) ? $values['position_text'] : '', $positions_text, ['layout' => 'v']) }}

Mobile Screen

{{ Form::field('file_manager', 'mobile_photo', isset($values['mobile_photo']) && $values['mobile_photo'] ? $values['mobile_photo'] : '', [], ['layout' => 'v', 'rows' => 159]) }}
@foreach ($mobile_photo_sizes as $type => $mobile_photo_size) @if ($mobile_photo_size != null) {!! $mobile_photo_size !!} @endif @endforeach
{{ Form::field('tinymce', 'mobile_brief', isset($values['mobile_brief']) ? $values['mobile_brief'] : '', [], ['layout' => 'v']) }} {{ Form::field('select', 'mobile_position_text', isset($values['mobile_position_text']) ? $values['mobile_position_text'] : '', $positions_text, ['layout' => 'v']) }}

{{ Form::field('checkbox', 'active', isset($values['active']) && $values['active'] ? true : false, []) }}
Cancel Save
{{ Form::close() }}
@endsection @push('script') {!! $validator->selector('#form1') !!} @endpush