Skip to content
Branch: v1.0.0
Go to file
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 

README.md

Extended FormFields hook interface to Voyager BREAD

This interface extends VoyagerBaseController::getContentBasedOnType(), which makes it easy to add data handlers for your own FormFields.

The package includes several additional FormFields:

  • Key-Value to JSON
  • Multiple Images with tag attributes

Over time, this list will be updated with new items.

Required

"laravel/framework": "5.7.*"
"tcg/voyager": "^1.1"

Key-Value to JSON

In BREAD configuration:

default

Add new item / Edit item:

default

Final Data:

default

Multiple Images with tag attributes

In BREAD configuration

image

Add new item / Edit item:

image

Final Data:

image

MODAL Template Custom

Include in template only:

    // Add area image
    @foreach($dataType->addRows as $row)
        @if ($row->type === 'multiple_images_with_attrs')
            <div class="form-group">
                <label for="name">{{ $row->display_name }}</label>
                {!! Voyager::formField($row, $dataType, $dataTypeContent) !!}
            </div>
            @break
        @endif
    @endforeach
    <div class="modal fade modal-danger" id="confirm_delete_modal">
        <div class="modal-dialog">
            <div class="modal-content">

                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"
                            aria-hidden="true">&times;</button>
                    <h4 class="modal-title"><i class="voyager-warning"></i> {{ __('voyager::generic.are_you_sure') }}</h4>
                </div>

                <div class="modal-body">
                    <h4>{{ __('voyager::generic.are_you_sure_delete') }} '<span class="confirm_delete_name"></span>'</h4>
                </div>

                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">{{ __('voyager::generic.cancel') }}</button>
                    <button type="button" class="btn btn-danger" id="confirm_delete">{{ __('voyager::generic.delete_confirm') }}</button>
                </div>
            </div>
        </div>
    </div>

About

No description, website, or topics provided.

Resources

Releases

No releases published
You can’t perform that action at this time.