Skip to content

Commit 8bd33cd

Browse files
committed
update documentation
1 parent 2551d17 commit 8bd33cd

File tree

1 file changed

+97
-5
lines changed

1 file changed

+97
-5
lines changed

README.md

Lines changed: 97 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
## Table of Contents
2222

2323
- [Installation](#installation)
24-
- [Configuration](#configuration)
24+
- [Usage](#usage)
25+
- [Blade Components](#blade-components)
2526
- [Disclaimer](#disclaimer)
2627
- [Contributions](#contributions)
2728
- [License](#license)
@@ -34,12 +35,10 @@ Requires PHP 8.2+ and Laravel 11+.
3435
composer require cloudinary-labs/cloudinary-laravel
3536
```
3637

37-
## Configuration
38-
39-
Publish the configuration file:
38+
After you have installed the SDK, you can invoke the install command to set everything up:
4039

4140
```bash
42-
php artisan vendor:publish --provider="CloudinaryLabs\CloudinaryLaravel\CloudinaryServiceProvider" --tag="cloudinary-laravel-config"
41+
php artisan cloudinary:install
4342
```
4443

4544
Add your Cloudinary credentials to your `.env` file:
@@ -53,6 +52,99 @@ CLOUDINARY_NOTIFICATION_URL=
5352
> [!NOTE]
5453
> You can get your `CLOUDINARY_URL` from your [Cloudinary console](https://cloudinary.com/console). It typically looks like this: `cloudinary://API_KEY:API_SECRET@CLOUD_NAME`. Make sure to replace `API_KEY`, `API_SECRET`, and `CLOUD_NAME` with your actual Cloudinary credentials.
5554
55+
## Usage
56+
57+
### Blade Components
58+
59+
This package provides a few Blade components for easy integration of Cloudinary media in your Laravel views.
60+
61+
#### Upload Widget
62+
63+
You can use the `<x-cloudinary::widget /> Blade component that ships with this like so:
64+
65+
```blade
66+
<!DOCTYPE html>
67+
<html>
68+
<body>
69+
<x-cloudinary::widget>Upload Files</x-cloudinary::widget>
70+
</body>
71+
</html>
72+
```
73+
74+
#### Image Component
75+
76+
Basic usage:
77+
78+
```blade
79+
<x-cloudinary::image public-id="example" />
80+
```
81+
82+
With additional properties:
83+
84+
```blade
85+
<x-cloudinary::image public-id="example" width="300" height="300" />
86+
```
87+
88+
##### Properties available:
89+
90+
| Property | Required |
91+
| --------------------- | -------- |
92+
| `public-id` | Yes |
93+
| `width` | No |
94+
| `height` | No |
95+
| `alt` | No |
96+
| `class` | No |
97+
| `crop` | No |
98+
| `gravity` | No |
99+
| `effect` | No |
100+
| `rotate` | No |
101+
| `colorize` | No |
102+
| `trim` | No |
103+
| `blur` | No |
104+
| `gray-scale` | No |
105+
| `black-white` | No |
106+
| `sepia` | No |
107+
| `redeye` | No |
108+
| `negate` | No |
109+
| `oil-paint` | No |
110+
| `vignette` | No |
111+
| `simulate-colorblind` | No |
112+
| `pixelate` | No |
113+
| `unsharp-mask` | No |
114+
| `saturation` | No |
115+
| `contrast` | No |
116+
| `brightness` | No |
117+
| `gamma` | No |
118+
| `improve-mode` | No |
119+
| `shadow` | No |
120+
| `border` | No |
121+
| `round-corners` | No |
122+
| `bg-color` | No |
123+
| `art` | No |
124+
| `cartoonify` | No |
125+
126+
#### Video Component
127+
128+
Basic usage:
129+
130+
```blade
131+
<x-cloudinary::video public-id="example"></x-cloudinary::video>
132+
```
133+
134+
With additional properties:
135+
136+
```blade
137+
<x-cloudinary::video public-id="example" width="300" height="300" />
138+
```
139+
140+
##### Properties available:
141+
142+
| Property | Required |
143+
| ----------- | -------- |
144+
| `public-id` | Yes |
145+
| `width` | No |
146+
| `height` | No |
147+
56148
## Disclaimer
57149

58150
> _This software/code provided under Cloudinary Labs is an unsupported pre-production prototype undergoing further development and provided on an “AS IS” basis without warranty of any kind, express or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. Furthermore, Cloudinary is not under any obligation to provide a commercial version of the software.</br> </br> Your use of the Software/code is at your sole risk and Cloudinary will not be liable for any direct, indirect, incidental, special, exemplary, consequential or similar damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of the Software, even if advised of the possibility of such damage.</br> </br> You should refrain from uploading any confidential or personally identifiable information to the Software. All rights to and in the Software are and will remain at all times, owned by, or licensed to Cloudinary._

0 commit comments

Comments
 (0)