@@ -34,29 +34,32 @@ use AceOfAces\LaravelImageTransformUrl\Facades\ImageTransformUrl;
3434
3535// Generate a URL with array options
3636$url = ImageTransformUrl::make(
37- 'foo/example.jpg',
38- ['width' => 250, 'quality' => 80, 'format' => 'webp'],
39- 'images'
37+ path: 'foo/example.jpg',
38+ options: ['width' => 250, 'quality' => 80, 'format' => 'webp'],
39+ pathPrefix: 'images'
4040);
4141
4242// Generate a URL with string options
4343$url = ImageTransformUrl::make(
44- 'foo/example.jpg',
45- 'width=250,quality=80,format=webp',
46- 'images'
44+ path: 'foo/example.jpg',
45+ options: 'width=250,quality=80,format=webp',
46+ pathPrefix: 'images'
4747);
4848
49- // Use default source directory (omit the third parameter)
49+ // Use default source directory (omit the pathPrefix parameter)
5050$url = ImageTransformUrl::make(
51- 'foo/example.jpg',
52- ['width' => 250, 'quality' => 80]
51+ path: 'foo/example.jpg',
52+ options: ['width' => 250, 'quality' => 80]
5353);
5454```
5555
5656The ` url() ` method is also available as an alias for ` make() ` :
5757
5858``` php
59- $url = ImageTransformUrl::url('img/example.jpg', ['width' => 250]);
59+ $url = ImageTransformUrl::url(
60+ path: 'img/example.jpg',
61+ options: ['width' => 250]
62+ );
6063```
6164
6265::: info
0 commit comments