PHP code example of lupennat / items

1. Go to this page and download the library: Download lupennat/items library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

lupennat / items example snippets


use Lupennat\Items\Items;

function fields() {
    return [
        Items::make('Emails'),
    ]
}

public $casts = [
    'emails' => 'array'
];

Items::make('Emails')->rules([
    'emails.*' => 'email|min:10',
]),

Items::make('Long Text', 'attribute')->rules([
    'attribute.*' => 'email|min:10',
]),