PHP code example of phuclh / flysystem-imagekit

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

    

phuclh / flysystem-imagekit example snippets


// Upload file (second argument can be an url, file or base64)
Storage::disk('imagekit')->put('filename.jpg', 'https://mysite.com/my_image.com');

// Get file
Storage::disk('imagekit')->get('filename.jpg');

// Delete file
Storage::disk('imagekit')->delete('filename.jpg');

// List all files 
Storage::disk('imagekit')->listContents('', false); // listContents($path, $deep)
bash
php artisan vendor:publish --tag="flysystem-imagekit-config"