@php # FORM METHOD ALWAYS DEFINED! if( !isset($method) ) $method = config('const.crud.create'); $edit = ($method === config('const.crud.update')); $insert = ($method === config('const.crud.create')); @endphp
@if(!empty($hidden)) @foreach ( $hidden as $key => $value) @endforeach @endif {{ csrf_field() }}
@foreach($groups as $inputs)
@foreach($inputs as $name => $input) @switch($input['type']) @case('input-hidden') @break; @case('input-switch') @unless( empty($input['label']) ) @endunless
@unless( empty($input['help']) )   {{ $input['help'] }} @endunless
@break @case('input-text') @unless( empty($input['label']) ) @endunless
@unless( empty($input['help']) )   {{ $input['help'] }} @endunless
@break @case('input-buttons') @unless( empty($input['label']) ) @endunless
@foreach (@$input['buttons'] as $button) @endforeach
@unless( empty($input['help']) )   {{ $input['help'] }} @endunless
@break @case('input-button') @unless( empty($input['label']) ) @endunless
@unless(empty($input['icon'])) @endunless
@break @case('textarea')
@break @case('select') @unless( empty($input['label']) ) @endunless
@unless( empty($input['help']) )   {{ $input['help'] }} @endunless
@break @case('datepicker')
@unless( empty($input['help']) )   {{ $input['help'] }} @endunless
@break @case('timepicker')
@unless( empty($input['help']) )   {{ $input['help'] }} @endunless
@break @case('map')
@break @case('file') @unless( empty($input['label']) ) @endunless
 
Select file Change Remove
@unless( empty($input['help']) )   {{ $input['help'] }} @endunless
@break @case('media')
 
Select file Change Remove
@break @case('nestable')
  1. Item 13
  2. Item 14
  3. Item 15
    1. Item 16
    2. Item 17
    3. Item 18
@break {{-- @case('portlet') @unless( empty($input['label']) ) @endunless
@include('layouts.order-products', [ 'order' => $orders[] ]);
@break --}} @endswitch @endforeach
@endforeach
@empty($save) @else @endempty
{{-- # VIEW DATA 'id' => 'categoriesInput', // * FORM ID (UNIQUE NAME) 'resource' => 'categories', // * (DB TABLE NAME) RESOURCE (RESOURCE ID) 'static' => '0', // NOT DINAMIC ALWAYS REFER THE SAME INPUT 'table' => 'categoriesRecord', // (ID) CONNECTED TABLE 'wysihtml5' => true, // WYSIHTML5 SUPPORT 'autoclose' => true // CLOSE MODAL CONTAINER RELATED IF ANY ON SUMBIT (DEFAULT false) # FORM CONFIG FORMAT jQuery(document).ready(function() { // INIT FORM {{ $id }}Form.init({ setup: { components: function(form){ // USE NAME $("#{{ $id }} input[name=name]").on( "change", function(){ Validation.formatFirstWordCapital(event.target); } ); }, successLoad: function(){ console.log('SUCCESS LOAD') }, validate: { rules: { 'name' : { required: true, minlength: 3, }, }, submit: { successUpdate: function(){ console.log('SUCCESS EDIT') }, successInsert: function(){ console.log('SUCCESS INPUT') } } }, } }); }); --}} @push('script') @endpush