bbs-lab/nova-cloudinary-field

A Cloudinary Media Library field for Laravel Nova.

Downloads

17174

Stars

1

Version

v0.3.0

Laravel Nova Cloudinary field

Latest Version on Packagist Software License Build Status StyleCI Quality Score Code Coverage Total Downloads

A Cloudinary Media Library field for Laravel Nova.

Contents

Installation

You can install the package via composer:

composer require bbs-lab/nova-cloudinary-field

The package will automatically register itself.

You can publish the config-file with:

php artisan vendor:publish --provider="BBSLab\CloudinaryField\CloudinaryFieldServiceProvider" --tag="config"

This is the contents of the published config file:

<?php

return [
    /*
    |--------------------------------------------------------------------------
    | Cloud Name
    |--------------------------------------------------------------------------
    |
    | This is the name of your Cloudinary cloud name
    | It can commonly be found on the upper left part of the Cloudinary
    | dashboard.
    |
    */

    'cloud_name' => env('CLOUDINARY_CLOUD_NAME',''),

    /*
    |--------------------------------------------------------------------------
    | API Key
    |--------------------------------------------------------------------------
    |
    | This is your public Cloudinary API key
    | It can commonly be found on the upper left part of the Cloudinary
    | dashboard.
    |
    */

    'api_key' => env('CLOUDINARY_API_KEY',''),

    /*
    |--------------------------------------------------------------------------
    | API Secret
    |--------------------------------------------------------------------------
    |
    | This is your secret Cloudinary key
    | It can commonly be found on the upper left part of the Cloudinary
    | dashboard (remember to click on "Reveal")
    |
    */

    'api_secret' => env('CLOUDINARY_API_SECRET',''),

    /*
    |--------------------------------------------------------------------------
    | Cloudinary Username
    |--------------------------------------------------------------------------
    |
    | This is the email address of the Cloudinary account you want to use.
    |
    */

    'username' => env('CLOUDINARY_USERNAME',''),
];

Usage

You can use the BBSLab\CloudinaryField\Cloudinary field in your Nova resource:

<?php

namespace App\Nova;

use BBSLab\CloudinaryField\Cloudinary;

class BlogPost extends Resource
{
    // ...
    
    public function fields(Request $request)
    {
        return [
            // ...

            Cloudinary::make('Image'),

            // ...
        ];
    }
    
}

Screenshots

List view

List view

Detail view

Detail view

Form view

Form view - Nothing selected Form view - Nothing selected

Form view - Picture selected Form view - Picture selected

Changelog

Please see CHANGELOG for more information what has changed recently.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.

BBS-Lab

Author

BBS-Lab