Skip to content

Commit 5f5023f

Browse files
authored
Merge pull request #20 from mattgorle/master
Remove need to call glide_url->url() to get the URL
2 parents 2b6ff39 + 4f3240c commit 5f5023f

File tree

6 files changed

+930
-412
lines changed

6 files changed

+930
-412
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ Types of changes
1414
* **Fixed** for any bug fixes.
1515
* **Security** in case of vulnerabilities.
1616

17+
## 0.4 - 2021-09-09
18+
### Changed
19+
* Allow glide_url result to be printed directly
20+
1721
## 0.2.2 - 2021-06-11
1822
### Fixed
1923
* fix for unit tests

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,18 @@ An example using a preset as a base and then making a few alterations using the
5353

5454
```php
5555
glide_url($pathToYourImageFile)->preset('medium')->filter('sepia')->url();
56+
57+
// You can also cast the FluentUrlBuilder to a string:
58+
59+
$url = (string)glide_url($pathToYourImageFile)->preset('medium')->filter('sepia');
60+
61+
// Or print it:
62+
63+
print glide_url($pathToYourImageFile)->preset('medium')->filter('sepia');
64+
65+
// Or use it directly in your blade templates:
66+
67+
{{ glide_url($pathToYourImageFile)->preset('medium')->filter('sepia') }}
5668
```
5769

5870
There are also predefined constants if you prefer using those rather than strings, e.g:

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Out of the box solution for Glide PHP for Laravel",
44
"type": "library",
55
"require": {
6-
"ampedweb/glide-url-helper": "^0.1",
6+
"ampedweb/glide-url-helper": "~0.1",
77
"league/glide-laravel": "^1.0",
88
"php": "^7.3|~8",
99
"phploc/phploc": "^7.0"

0 commit comments

Comments
 (0)