Download the PHP package aurorawebsoftware/flexyfield without Composer

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

FlexyField - Dynamic Model Fields for Laravel

FlexyField is a dynamic fields package for Laravel, allowing developers to define flexible and customizable fields on models without needing to change the database schema.

It enables on-the-fly definition of fields, field types, validation, and value assignment, providing the perfect solution for projects requiring flexible content structures.

Key Features

Installation

To install the package via Composer, run:

After installing, run the provided migrations to create the necessary tables:

Database Structure

The package creates two main tables and one view:

Quick Start

Adding Flexy Fields to a Model

To start using Flexy fields, simply include the Flexy trait and implement the FlexyModelContract in your model.

This enables the model to support dynamically assigned fields.

Setting and Retrieving Flexy Fields

Once the model is set up, you can define and assign flexy fields to it. Fields are assigned through the flexy attribute.

Defining Model Shapes for Validation

A shape is a field definition with a type and validation rules. Each Model can have one shape. You can define shapes dynamically with setFlexyShape() for fields to apply validation.

This ensures that when saving the color field, it must be a required, and the size field must be a number greater than or equal to 20.

all available validation rules: https://laravel.com/docs/11.x/validation#available-validation-rules

To retrive and delete a model shape

Saving a Model with Validation

After defining shapes with validation, saving a model with invalid data will throw a ValidationException.

Advanced Usage

Querying Models by Dynamic Fields

FlexyField allows you to query models based on their flexy field values. Here's an example of how to filter models using their Flexy fields:

Dynamic Validation

Flexy fields can be validated using the shapes you define. For example, you can set validation rules like:

If a user tries to save invalid data, Laravel's native validation system kicks in and prevents the save:

Using Dates and Datetimes

FlexyField supports handling date and datetime field types.

Dynamic Field Sorting

FlexyField allows you to specify a sorting order for fields using the sort parameter:

This controls how fields are ordered when retrieved or displayed.

Configuration

You can configure the package to use different database drivers (e.g., MySQL or PostgreSQL) for the flexy field pivot table.

Contribution

Feel free to contribute to the development of FlexyField by submitting a pull request or opening an issue. Contributions are always welcome to enhance this package.


Running Tests

Before submitting any changes, make sure to run the tests to ensure everything is working as expected:

You can run the tests provided using Pest to ensure everything is working as expected.

Code Style

Static Analyze

License

The FlexyField package is open-sourced software licensed under the MIT License.



All versions of flexyfield with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^10.0||^11.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 aurorawebsoftware/flexyfield contains the following files

Loading the files please wait ....