diff --git a/kernel/helpers/Slug.php b/kernel/helpers/Slug.php index aab7264..0bde8c1 100644 --- a/kernel/helpers/Slug.php +++ b/kernel/helpers/Slug.php @@ -127,6 +127,11 @@ class Slug return $options['lowercase'] ? mb_strtolower($str, 'UTF-8') : $str; } + /** + * @param string $title + * @param $model + * @return string + */ public static function createSlug(string $title, $model = null): string { $slug = Slug::url_slug($title, ['transliterate' => true, 'lowercase' => true]); @@ -137,7 +142,14 @@ class Slug return Slug::recursiveCreateSlug($model, $slug); } - protected static function recursiveCreateSlug($model, string $slug, string $tmpSlug = '', int $id = 1): string + /** + * @param $model + * @param string $slug + * @param string $tmpSlug + * @param int $id + * @return string + */ + private static function recursiveCreateSlug($model, string $slug, string $tmpSlug = '', int $id = 1): string { if ($tmpSlug === '') $tmpSlug = $slug; if ($model::where(['slug' => $tmpSlug])->exists()) {