PHP code example of khodja / upload

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

    

khodja / upload example snippets


'providers' => [
    // ...
    Intervention\Image\ImageServiceProvider::class,
    Khodja\Upload\UploadServiceProvider::class, 
];

'aliases' => [
    ...
    'Upload' => Khodja\Upload\Facades\Upload::class
];

Route::get('/post-image/{id}', function($id)
{
    return Upload::getImage('image', $id);
});

php artisan vendor:publish --provider="Khodja\Upload\UploadServiceProvider"