Skip to content

Commit

Permalink
Update Base.php
Browse files Browse the repository at this point in the history
  • Loading branch information
sdebacker committed Jan 11, 2024
1 parent a75c06a commit 8766dd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Models/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function uri($locale = null): string
{
$locale = $locale ?: config('app.locale');
$route = $locale . '::' . Str::singular($this->getTable());
$slug = $this->translate('slug', $locale);
$slug = !empty($this->slug) ? $this->translate('slug', $locale) : null;
if (Route::has($route) && !empty($slug)) {
return route($route, $slug);
}
Expand Down

0 comments on commit 8766dd1

Please # to comment.