Base library for repeated layout fields, content builders and other collection components

Overview

laravel-flexible-content

This package's only purpose is to build custom repeated layout components, such as Laravel Nova's Flexible Content field or your own content builders and manageable component collections. It is meant to provide a tested and multi-purpose backend API that should be extended by specific components (regardless of their frontend stack).

Docs (under construction)

  • Installation & base use cases
  • layouts registration
    • register($layout, $limit)
  • get all registered layouts
    • layouts()
  • limiting layouts
    • limit($instances)
    • $layout->limit($instances)
  • building instances
    • build($data)
    • buildUsing($callback)
    • insert($key, $attributes, $index, $id)
  • serializing the flexible container's state
    • serialize()
    • serializeAs($format)
    • serializeUsingFormat($format)
    • serializeUsing($callback)
  • get all inserted instances, and manipulate the LayoutCollection :
    • instances()
    • $instances->find($key)
    • $instances->whereKey($key)
    • $instances->whereKeyNot($key)
    • $instances->whereKeyIn($key)
    • $instances->whereKeyNotIn($key)
  • counting instances
    • count($key = null)

Testing

This library uses PestPHP. If you're considering contributing, please make sure all existing tests are still valid and that your changes are fully covered before submitting a PR.

Once installed, run the tests using ./vendor/bin/pest.

You might also like...
Collection of scripts, thoughts about CSP (Content Security Policy)

CSP useful, a collection of scripts, thoughts about CSP I'm testing and using CSP (Content Security Policy), and here are some thoughts, resources, sc

Library extra fields for Laravel Orchid Platform
Library extra fields for Laravel Orchid Platform

Orchid Fields Extra library which add different fields in Laravel Orchid Platform Installation You may install into your project using the Composer pa

Laravel Livewire form component with declarative Bootstrap 5 fields and buttons.

Laravel Livewire Forms Laravel Livewire form component with declarative Bootstrap 5 fields and buttons. Requirements Bootstrap 5 Installation composer

This Laravel Nova settings tool based on env, using nativ nova fields and resources
This Laravel Nova settings tool based on env, using nativ nova fields and resources

Nova Settings Description This Laravel Nova settings tool based on env, using nativ nova fields and resources Features Using native Nova resources Ful

This Laravel Nova package allows you to manage media and media fields
This Laravel Nova package allows you to manage media and media fields

Nova Media Hub This Laravel Nova package allows you to manage media and media fields. Requirements php: =8.0 laravel/nova: ^4.0 Features Media Hub UI

A base API controller for Laravel that gives sorting, filtering, eager loading and pagination for your resources

Bruno Introduction A Laravel base controller class and a trait that will enable to add filtering, sorting, eager loading and pagination to your resour

A laravel package to handle model specific additional meta fields in an elegant way.

Laravel Meta Fields A php package for laravel framework to handle model meta data in a elegant way. Installation Require the package using composer: c

Makes working with DateTime fields in Laravel's Nova easier

This package adds a DateTime field with support for a global DateTime format, syntactic sugar for formatting individual DateTime fields and powerful d

A demo of how to use filament/forms to build a user-facing Form Builder which stores fields in JSON.

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Owner
Whitecube
Digital Agency based in Belgium
Whitecube
Livewire UI components with tailwind base style

WireUI ?? Documentation Wire UI is a library of components and resources to empower your Laravel and Livewire application development. Starting a new

WireUi 811 Jan 2, 2023
Simple Arabic Laravel Dashboard , has basic settings and a nice layout . to make it easy for you to create fast dashboard

Simple Arabic Laravel Dashboard ✅ Auto Seo ✅ Optimized Notifications With Images ✅ Smart Alerts ✅ Auto Js Validations ✅ Front End Alert ✅ Nice Image V

Peter Tharwat 254 Dec 19, 2022
Extend Kirby’s templates with a powerful layout system

Kirby Layouts plugin This plugin extends Kirby’s templates with a powerful layout system. Installation Download Download and copy this repository to /

Kirby 3 39 Dec 28, 2022
Multi layout react laravel

multi-layout-react-laravel multi layout react-laravel is a repository for creating 1 integrated system, this repository uses react(laravel ui) version

null 2 Feb 13, 2022
A collection of reusable components for Filament.

A collection of reusable components for Filament. This package is a collection of handy components for you to use in all your Filament projects. It pr

Ralph J. Smit 35 Nov 16, 2022
A collection of pre-made simple Laravel Blade form components.

Laravel Form Components Library A collection of pre-made simple Laravel Blade form components. Installation & setup You can install the package via co

null 3 Oct 5, 2022
PHP components - collection of cross-project PHP classes

PHP components Collection of cross-project PHP classes. Install: $ composer require ansas/php-component Ansas\Component\Convert\ConvertPrice Convert "

null 1 Jan 5, 2022
Collection of agnostic PHP Functions and helpers with zero dependencies to use as foundation in packages and other project

Collection of agnostic PHP Functions and helpers This package provides a lot of very usefull agnostic helpers to use as foundation in packages and oth

padosoft 54 Sep 21, 2022
A collection of common algorithms implemented in PHP. The collection is based on "Cracking the Coding Interview" by Gayle Laakmann McDowell

PHPAlgorithms A collection of common algorithms implemented in PHP. The collection is based on "Cracking the Coding Interview" by Gayle Laakmann McDow

Doğan Can Uçar 921 Dec 18, 2022
cybercog 996 Dec 28, 2022