PHP code example of dbt / laravel-filepond

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

    

dbt / laravel-filepond example snippets




return [

       /**
     * Disk on which to store temporary files
     */
    'disk_name' => env('FILEPOND_TEMP_DISK', 'local'),

    /**
     * Set a validation rules for temporary files
     * Example: ['file', 'mimes:png,jpg']
     */
    'temporary_file_rules' => [' filepond routes. It can be string or an array
     */
    'middleware' => 'web'
];


    // ...
    'disks' => [
        // ...
         'temp' => [
            'driver' => 'local',
            'root' => storage_path('temp'),
        ],
    // ...

use Dbt\LaravelFilepond\Request;

public function __invoke(Request $request)
{
    $request->file('avatar')->store('avatars');
}



use Dbt\LaravelFilepond\Request;

public function __invoke(Request $request)
{
    $request->validate([
        'avatar' => ['
bash
php artisan vendor:publish --provider="Dbt\LaravelFilepond\LaravelFilepondServiceProvider" --tag="config"