Skip to content

Commit

Permalink
Media::getURL() fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastiandedeyne committed Jun 2, 2015
1 parent 87cf2e6 commit b8a1825
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Models/Media.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,18 @@ public function getAllProfileURLs()
}

/**
* Get the URL to a generated Glide-image.
* Get the URL to the original file or the generated Glide-image.
*
* @param $profile
* @param $profile|null
*
* @return bool
*/
public function getURL($profile)
public function getURL($profile = null)
{
if (! $profile) {
return $this->getOriginalURL();
}

if (is_array($profile)) {
return $this->createGlideImageURL($profile);
}
Expand Down

0 comments on commit b8a1825

Please sign in to comment.