PHP code example of jenky / laravel-plupload

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

    

jenky / laravel-plupload example snippets


Jenky\LaravelPlupload\PluploadServiceProvider::class,

'Plupload' => Jenky\LaravelPlupload\Facades\Plupload::class,

{!! Plupload::make('my_uploader_id', route('photos.store'))->render() !!}

{!! plupload()->make('my_uploader_id', route('photos.store')) !!}
// or even shorter
{!! plupload('my_uploader_id', route('photos.store')) !!}

{!! plupload('my_uploader_id', route('photos.store'))
    ->setOptions([
        'filters' => [
            'max_file_size' => '2mb',
            'mime_types' => [
                ['title' => 'Image files', 'extensions' => 'jpg,gif,png'],
            ],
        ],
    ]) !!}

{!! plupload('my_uploader_id', route('photos.store'))->setAutoStart(true) !!}

return Plupload::file('file', function($file) {
    // Store the uploaded file using storage disk
    $path = Storage::disk('local')->putFile('photos', $file);

    // Save the record to the db
    $photo = App\Photo::create([
        'name' => $file->getClientOriginalName(),
        'type' => 'image',
        // ...
    ]);

    // This will be 

return plupload()->file('file', function($file) {

});

php artisan vendor:publish

php artisan vendor:publish --provider="Jenky\LaravelPlupload\PluploadServiceProvider"