Documentation

FilePond extends Component

FilePond Laravel Blade Component

A file upload component using FilePond for enhanced user experience. Supports multiple file uploads, drag-and-drop functionality, and real-time progress indicators. Features customizable labels and options for flexibility.

Features:

  • Multiple file upload support
  • Drag-and-drop functionality
  • Real-time upload progress indicators
  • Customizable labels
  • Form validation integration
  • Livewire real-time updates
  • Bulma CSS framework integration
  • Mobile-friendly responsive design

Livewire Integration:

IMPORTANT: The component handles Livewire communication through custom events.

Events Dispatched:

  • CancelFile:{{ $id }} - Fired when file upload is cancelled Payload: none

Events Listened For:

  • ResetFile:{{ $id }} - Resets the file input to empty state Payload: none
  • SetTempFile:{{ $id }} - Sets a temporary file in the input Payload: { fileName: string, url: string }
Tags
author

V360

version
1.0.0
since
2024-07-15
example

Table of Contents

$id  : string
$label  : mixed
$name  : string
$options  : array<string|int, mixed>
__construct()  : mixed
Constructor for the component.
render()  : View|string
Get the view / contents that represent the component.

Properties

$options

public array<string|int, mixed> $options = []

Methods

__construct()

Constructor for the component.

public __construct(string $name, string $id[, mixed $label = null ][, array<string|int, mixed> $options = [] ]) : mixed

This component is used to create a file upload field using FilePond. It allows for easy file uploads with various options and features.

Parameters
$name : string

The name of the file field. It should match the name of the file field in the form.

$id : string

The unique id of the file field.

$label : mixed = null

The label for the file field. If not provided, it will be generated from the name.

$options : array<string|int, mixed> = []

The options for the file field.

Return values
mixed

render()

Get the view / contents that represent the component.

public render() : View|string
Return values
View|string

Search results