Downloads
Stars
Version
A Cloudinary Media Library field for Laravel Nova.
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',''),
];
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'),
// ...
];
}
}
Form view - Nothing selected
Form view - Picture selected
Please see CHANGELOG for more information what has changed recently.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.