Download the PHP package marshmallow/prefiller-field without Composer

On this page you can find all versions of the php package marshmallow/prefiller-field. 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 prefiller-field

alt text

Nova Prefiller Field

Latest Version on Packagist PHP Syntax Checker Total Downloads

A Laravel Nova field to prefill fields based on another field. Super Awesome!

When a source field (for example a BelongsTo relation) changes in a Nova form, the prefiller field looks up the selected model and fills itself with a value taken from that model — either an attribute or a method on it.

Installation

Install the package via Composer:

The package registers its service provider automatically through Laravel's package discovery, so there is nothing else to set up.

Usage

Use the prefiller fields inside a Nova resource's fields() method. Point each field at the source field with sourceField(), tell it which model to look up with sourceModel(), and choose the attribute or method to copy with prefillWith().

Available methods

Every prefiller field inherits the standard Nova field methods plus the following helpers from the Prefillable trait:

Method Description
sourceField($source_field) The attribute of the field that triggers the prefill (for example the BelongsTo relation).
sourceModel($source_model) The fully-qualified model class that is looked up when the source field changes.
prefillWith($prefill_with) The attribute or method on the looked-up model whose value is used to prefill the field.
allowUpdatingFilledFields() Re-check for new values even when the target field already has content (by default a filled field is left untouched).
fieldType($type) Override the field type passed to the front-end component.

Extra methods

If you want the prefiller to check for new values, even if the target field is already filled with content, you can call the method allowUpdatingFilledFields().

Supported fields

Currently we have only implemented the Text and Currency fields because we needed them in a project for a customer. We will add more in the coming months. Feel free to send a pull request if you need another field for your project.

Security Vulnerabilities

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

Credits

License

The MIT License (MIT). Please see the License File for more information.


All versions of prefiller-field with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1|^8.0
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 marshmallow/prefiller-field contains the following files

Loading the files please wait ...