Skip to content

Commit

Permalink
Replace "str_contains" with "Str::contains" in UrlGenerator class
Browse files Browse the repository at this point in the history
  • Loading branch information
Frano committed Nov 15, 2019
1 parent 040d93a commit 12ff03b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/UrlGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace LaravelTrailingSlash;

use Illuminate\Routing\UrlGenerator as BaseUrlGenerator;
use Illuminate\Support\Str;

class UrlGenerator extends BaseUrlGenerator
{
Expand All @@ -17,6 +18,6 @@ class UrlGenerator extends BaseUrlGenerator
*/
public function format($root, $path, $route = null)
{
return parent::format($root, $path, $route).(str_contains($path, '#') ? '' : '/');
return parent::format($root, $path, $route).(Str::contains($path, '#') ? '' : '/');
}
}

0 comments on commit 12ff03b

Please sign in to comment.