| Package Data | |
|---|---|
| Maintainer Username: | Sopamo |
| Maintainer Contact: | p.mohr@sopamo.de (Paul Mohr) |
| Package Create Date: | 2019-02-28 |
| Package Last Update: | 2025-03-19 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-10-21 15:00:10 |
| Package Statistics | |
|---|---|
| Total Downloads: | 239,643 |
| Monthly Downloads: | 4,672 |
| Daily Downloads: | 286 |
| Total Stars: | 213 |
| Total Watchers: | 1 |
| Total Forks: | 58 |
| Total Open Issues: | 7 |
Require this package in the composer.json of your Laravel project.
composer require sopamo/laravel-filepond
If you need to edit the configuration, you can publish it with:
php artisan vendor:publish --provider="Sopamo\LaravelFilepond\LaravelFilepondServiceProvider"
Included in this repo is a Filepond upload controller which is where you should direct uploads to. Upon upload the controller will return the $serverId which Filepond will send via a hidden input field (same name as the img) to be used in your own controller to move the file from temporary storage to somewhere permanent using the getPathFromServerId($request->input('image')) function.
// Get the temporary path using the serverId returned by the upload function in `FilepondController.php`
$filepond = app(Sopamo\LaravelFilepond\Filepond::class);
$path = $filepond->getPathFromServerId($serverId);
// Move the file from the temporary path to the final location
$finalLocation = public_path('output.jpg');
\File::move($path, $finalLocation);
Set at least the following Filepond configuration:
FilePond.setOptions({
server: {
url: '/filepond/api',
process: '/process',
revert: '/process',
headers: {
'X-CSRF-TOKEN': '{{ csrf_token() }}'
}
}
});