PHP code example of aonodevs / laravel-cloudinary-upload

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

    

aonodevs / laravel-cloudinary-upload example snippets


return [
    /*
     * Your cloudinary upload url
     */
    "url" => env('CLOUDINARY_URL')
];

use AonoDevs\LaravelCloudinaryUpload\CloudinaryTrait;
// ...

class Article extends Model
{
    use CloudinaryTrait;

    protected $fillable = [
        'title',
        'header_img', // Image
        'footer_img', // Image
        'content_video', // Video
    ];

    protected array $cloudinary_image = ['header_img', 'footer_img'];
    
    protected array $cloudinary_video = ['content_video'];
    
    // ...
}
bash
php artisan vendor:publish --tag="cloudinary-upload-config"