diff --git a/README.md b/README.md index 6d3b758..6a41099 100644 --- a/README.md +++ b/README.md @@ -22,11 +22,9 @@ - [Installation](#installation) - [Configuration](#configuration) -- [Usage](#usage) - - [Upload, Retrieval & Transformation](#upload-retrieval--transformation) - - [Attach Files to Eloquent Models](#attach-files-to-eloquent-models) - - [Upload Widget](#upload-widget) - - [Media Management via CLI](#media-management-via-cli) +- [Upload, Retrieval & Transformation](#upload-retrieval--transformation) +- [Attach Files to Eloquent Models](#attach-files-to-eloquent-models) +- [Media Management via CLI](#media-management-via-cli) - [Cloudinary URL Generation](#cloudinary-url-generation) - [Blade Components](#blade-components) - [Disclaimer](#disclaimer) @@ -117,22 +115,6 @@ $page->updateMedia($newFile); $page->detachMedia($file); ``` -### Upload Widget - -Add the Cloudinary JS to your layout: - -```html - - @cloudinaryJS - -``` - -Use the upload button component: - -```html - Upload Files -``` - ### Media Management via CLI ```bash @@ -157,110 +139,97 @@ $url = cloudinary()->getUrl($publicId); ## Blade Components -This package provides several Blade components for easy integration of Cloudinary media in your Laravel views: +This package provides several Blade components for easy integration of Cloudinary media in your Laravel views -### Image Component +### Upload files via an Upload Widget -Basic usage: +You can use the `` Blade component that ships with this page like so: -```html - +```blade + + + + ... @cloudinaryJS + + + Upload Files + + ``` -With transformations: +### Image Component -```html - - - -``` +Basic usage: -Responsive image: - -```html - - - - - - -``` +```blade + +``` + +With additional properties: + +```blade + +``` + +#### Properties available: + +| Property | Required | +| --------------------- | -------- | +| `public-id` | Yes | +| `width` | No | +| `height` | No | +| `alt` | No | +| `class` | No | +| `crop` | No | +| `gravity` | No | +| `effect` | No | +| `rotate` | No | +| `colorize` | No | +| `trim` | No | +| `blur` | No | +| `gray-scale` | No | +| `black-white` | No | +| `sepia` | No | +| `redeye` | No | +| `negate` | No | +| `oil-paint` | No | +| `vignette` | No | +| `simulate-colorblind` | No | +| `pixelate` | No | +| `unsharp-mask` | No | +| `saturation` | No | +| `contrast` | No | +| `brightness` | No | +| `gamma` | No | +| `improve-mode` | No | +| `shadow` | No | +| `border` | No | +| `round-corners` | No | +| `bg-color` | No | +| `art` | No | +| `cartoonify` | No | ### Video Component Basic usage: -```html +```blade ``` -With transformations: +With additional properties: -```html - - - +```blade + ``` -### Upload Button Component +#### Properties available: -Basic usage: - -```html -Upload Files -``` - -With custom options: - -```html - - Upload Multiple Files - -``` - -### Image Gallery Component - -```html - - -
Loading...
-
-
-``` - -### Transformation Component - -This component can be used within other components to apply transformations: - -```html - - - - -``` +| Property | Required | +| ----------- | -------- | +| `public-id` | Yes | +| `width` | No | +| `height` | No | ## Disclaimer diff --git a/resources/views/components/video.blade.php b/resources/views/components/video.blade.php index 8d4d94e..79ca902 100644 --- a/resources/views/components/video.blade.php +++ b/resources/views/components/video.blade.php @@ -1,14 +1,4 @@ @php - - use Cloudinary\Transformation\Effect; - use Cloudinary\Transformation\Resize; - use Cloudinary\Transformation\Rotate; - use Cloudinary\Transformation\Argument\Color; - use Cloudinary\Transformation\RoundCorners; - use Cloudinary\Transformation\Border; - use Illuminate\Support\Str; - - $defaultFormatMethod = 'scale'; $retrieveFormattedVideo = cloudinary()->getVideoTag($publicId ?? '') ->setAttributes(['controls', 'loop', 'preload'])