Download the PHP package yaroslawww/nova-flexible-content without Composer

On this page you can find all versions of the php package yaroslawww/nova-flexible-content. 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 nova-flexible-content

Laravel Nova Flexible Content

Packagist License Packagist Version Total Downloads Build Status Code Coverage Scrutinizer Code Quality

This is fork from great package whitecube/nova-flexible-content but reworked without easy possibility to merge functionality to main package

An easy & complete Flexible Field for Laravel Nova, perfect for repeated and flexible field groups.

Nova Package
V1 V1 V2
V4 V3 V4

Installation

Usage

A flexible field allows easy management of repeatable and orderable groups of fields. This package does not have constraints on which fields you are allowed to use within these groups. That means you can use all Laravel Nova field types, and also any community-made fields.

Layouts

A layout represents a group of fields that can be repeated inside the Flexible field. You can add as many different layouts as you wish. If only one layout is defined the field will behave like a simple Repeater and by adding more layouts you'll obtain a Flexible Content.

Layout definition

Then use this layout

Customizing display

You can change the display by call methods:

Value resolver

By default, the field takes advantage of a JSON column on your model's table. In some cases, a JSON attribute is just not the way to go. For example, you could want to store the values in another table (meaning you'll be using the Flexible Content field instead of a traditional BelongsToMany or HasMany field). No worries, we've got you covered!

Resolver definition

Each Resolver MUST implement the NovaFlexibleContent\Value\Resolver contract and therefore feature at least two methods: set and get.

Resolve the field

The get method used to resolve the field's content. It is responsible to retrieve the content from somewhere and return a collection of layouts instances (groups). For example, we could want to retrieve the values on a blocks table and transform them into Layout instance:

Fill the field

The set method is responsible for saving the Flexible's content. In our example, it should store the data in a blocks table:

Preset

In addition to reusable Layout classes, you can go a step further and create Preset classes for your Flexible fields. These allow you to reuse your whole Flexible field anywhere you want. They also make it easier to make your Flexible fields dynamic, for example if you want to add Layouts conditionally. And last but not least, they also have the added benefit of cleaning up your Nova Resource classes, if your Flexible field has a lot of useLayout definitions.

Preset definition

Display flexible content

The field stores its values as a single JSON string, meaning this string needs to be parsed before it can be used in your application.

IDE Helper

Create helper file for IDE your Flexible Layouts in application.

Credits


All versions of nova-flexible-content with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
laravel/nova Version ^4.0
laravel/framework Version ^9.0|^10.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 yaroslawww/nova-flexible-content contains the following files

Loading the files please wait ....