PHP code example of remocodebe / laravelnova-filepond

1. Go to this page and download the library: Download remocodebe/laravelnova-filepond 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/ */

    

remocodebe / laravelnova-filepond example snippets


use DigitalCreative\Filepond\Filepond;

class Post extends Resource
{
    public function fields(Request $request)
    {
        return [
            // ...
            Filepond::make('Audio Example')
                    ->multiple() // the default is single upload, use this method to allow multiple uploads
                    ->limit(4) // limit the number of attached files
                    ->rules('eturn Str::random(20) . '.' . $file->getExtension();
                    })

        ];

    }
}

class Post extends Model {
    
    /**
     * The attributes that should be cast to native types.
     *
     * @var array
     */
    protected $casts = [
        'images' => 'array'
    ];

}

'doka' => [
    'enabled' => true,
    'js_path' => public_path('doka.min.js'), // this assumes you places theses files within your public directory
    'css_path' => public_path('doka.min.css'),
]

public function fields(Request $request)
{
    return [
        //...

        Filepond::make('Avatar')->withDoka([
            'cropShowSize' => true
        ]),
        
        /**
         * This will disable Doka for this specific field
         */
        Filepond::make('Simple Image')->withoutDoka(),

    ];
}
bash
php artisan vendor:publish --provider="DigitalCreative\Filepond\FilepondServiceProvider" --tag="config"