Download the PHP package monstrex/voyager-extension without Composer

On this page you can find all versions of the php package monstrex/voyager-extension. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package voyager-extension

Voyager Extension

The package extends the original Voyager Admin Panel with some new advantages and features.

Features

New custom fields:

Package installation

Requirement

Laravel: v8+ or v9+
Voyager: v1.6+
You should fully install the package Voyager before.

Via Composer

Then run migrations:

Publish config if you need:

To use Image fields you need publish and migrate laravel-medialibrary resources

Optional you may like to publish the config laravel-medialibrary as well

Configure

Config file

Using coordinates field

Some of legacy voyager fields like 'coordinates' don't work properly in the mode 'legacy_edit_add_bread' => false
To make it work as supposed to be you need copy the legacy template file into your own template folder: /resources/views/vendor/voyager/formfields/coordinates.blade.php
Then you should replace string:

with:

Models

To use additional images fields you should to configure your models like this:

Also you can use any other advantages provided by laravel-medialibrary package.

Description and usage

Design of the BREAD Builder was changed to make it more compact and handy (can be disabled by config):

All JSON fields are collapsable now and collapsed by default. To expand json editors - just click on it.

Common extra details in BREAD Builder page:

New basic action buttons on the sticky panel for add-edit modes (can be disabled by config):

The package also provide some new type fields.

Field: VE Image

The field utilize laravel-medialibrary package to store single image. In addition this field can hold text attributes TITLE and ALT.

Field: VE Media Files

This field represents laravel-medialibrary collection with subsets of additional custom fields. Uses to store any media files. The collection can be sorted as you need using drag and drop. Select and group removing is implemented.

By default it keeps two fields - Title and Alt. Changing a file inside a collection element is allowed. You can use the field like a collection of widgets or just like a sortable image collection. Elements of media collection can hold additional content fields using BREAD Json Options.

Implemented fields types:

Accepted files types template:

By default uses "image/*" template.

Retrieving field data on frontend side.

You can use any method provided by laravel-medialibrary package. The field name of is represented media gallery name.

More details see in the original laravel-medialibrary documentation.

Field: VE Fields Group

Is a simple JSON like fieldset. Support three field subtypes inside: text, number and textarea. Useful when you need implement the same group fields in different models.

BREAD Json Options:

Retrieving data:

Field: VE JSON Fields

Sortable multi-rows and multi-fields JSON storage.

BREAD Json multi-field configuration:

Stored data structure (2 rows):

Field: VE Select Dropdown Tree

Represents tree-like dropdown control related to the certain model. BREAD Json Options (Post model, category_id field):

Where:
browse_filter - if you use filter for this field in the browse mode
model - Source model class
key - Key field to reference
label - Display name field
ref_field - The current model field referenced to the relative model
filter_label - Display label for the filter mentioned above (if present).

In a Post model add:

Field: VE Related Models

Represents of a sortable model records list. Uses autocomplete field to add new specified entries.
The model describes in details Bread field.

Where:
source: a slug of the model
search_field: a field for search
display_field: a field to display as label/title,
fields: set of fields to store.

Predefined fields are: id and field mentioned in the display_field option.

Stored JSON format:

Field: VE Inline Fields Set

The complex combined field. Represent groups of built in internal custom fields. 10 Internal field types supported. Fields data can be stored as in your current model field and also as a specified table data.

Row details data for the field:

Where:
many: Many rows allowed if true. columns: Number of columns for fields set separation (many sets in one row). The values are: 1 - 6.
source: Model name (class) for the data storage. If not present used local model field.
Storage model should have next fields:
row_id - keeps local inline fields set row id. model - master model name.
model_id - master model id.
model_field - master model related field.
order - a sorting field, keeps row order.

Also, all custom inline fields you need with specific types.

Allowed fields:
number - db storage type: number
text - db storage type: varchar
textarea - db storage type: text
richtext - db storage type: text, supported option: min_height
code - db storage type: text, supported options: mode, theme, minlines and maxlines
media - db storage type: text (handles for media-library), can hold multiple media files with sorting. Supported options: remove_delay - pause in ms before media file will be removed (after clicking remove button).
date - db storage type: date
checkbox - db storage type: tinyint, supported options: see the example above
radio - db storage type: text, supported options: see the example above
select - db storage type: text, supported options: see the example above

Each field also can have additional common options:
class - a wrapper class, to organize the layout inside the set. attrs - a list of any you need html attributes for the field.

Retrieving stored data from the field:

Prepare your model and add InlineSetTrait trait:

Then just use trait method:

Where news_sections is the field name keeps inline fields set.

Also, the trait is necessary to remove related sources data in corresponding table during model delete.

Field: VE Page Layout

The special content field type. Available only if Voyager Site package is installed. Provides a subsystem to organize the layout of content fields, blocks, and forms on a page.

BREAD Json Option for this field:

layout_fields - list of model (bread) fields available for a selection.

block_model - block model class used for retrieve block content records. If param is not present, the block model select input will not be displayed on the edit/add views.

form_model - form model class used for retrieve form content records. If param is not present, the form model select input will not be displayed on the edit/add views;

style_classes - additional style classes to be applied to the select input fields on the edit/add views. Default value: col-md-4.

Rendering the field:

New BREAD Browse modes and options

Dropdown browse filters

Needed for filtering data in a browse mode. Uses on relationship "belongs to" field type only.

Tree mode

New TREE browse mode implemented. If you have the field parent_id you can add option browse_tree for it and then TREE browse mode will enabled :

The tree mode looks similar to the menu tree view.

You can use option browse_tree_push_right to push browsed fields to the right part of the view line.

All browsed fields after this field will push right.

Alternate browse title

Just replaces default bread field title with a provided option title:

Inline checkbox switcher

Using browse_inline_editor you can enable an inline switcher in a browse view mode. After that you can change the field value directly (by clicking on it) from a browse mode without entering an edit mode.

Inline text, number editors

Using browse_inline_editor you can also enable an inline editors in a browse view mode for text and number types. After that you can change the field value directly from a browse mode without entering to edit mode.

Action on a field click

If you add this option url you will be able to call appropriate action for the record using just a click on it. For an instance let it be field Title

Column width, align and font size

Sets width, align and font-size for the column in browse mode:

Column order

Set browse order you need in the Extra Options of BREAD Builder.

Notice: a voyager relation field should use their own naming convention like block_belongsto_block_region_relationship.

Also you can change the column order in a browse mode using this option:

Image max height in a row

Sets maximal height of thumbnail images:

Section separator

This option makes a visual section separator line.

Tabs layout for add-edit mode

In add-edit BREAD mode you can use Tabbed layout. Just put the option tab_title where you want to start a new TAB.

You don't need to make the first TAB, it'll be created automatically.

Localizations

New types of fields don't provide localization service used in Voyager. However, you can use built-in localization helper and retrieve translated substring from a field content:

Security

If you discover any security related issues, please email author email instead of using the issue tracker.


All versions of voyager-extension with dependencies

PHP Build Version
Package Version
Requires tcg/voyager Version ^1.6.0
spatie/laravel-medialibrary Version ^10.0.0
illuminate/support Version ~9.0|~10.0
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package monstrex/voyager-extension contains the following files

Loading the files please wait ....