|
@@ -104,14 +104,12 @@ class DistProductCategoryController extends AdminDistController
|
|
|
|
|
|
$form->saving(function (Form $form) {
|
|
|
$form->dist_id =getDistributorId();
|
|
|
-
|
|
|
+
|
|
|
$id = $form->getKey();
|
|
|
- $form->slug=trim($form->slug);
|
|
|
- if ($form->slug != '') {
|
|
|
-
|
|
|
- $form->slug = preg_replace('/\s+/', '-', $form->slug);
|
|
|
- $form->slug = strtolower($form->slug);
|
|
|
|
|
|
+
|
|
|
+ $form->flug=CommonHelper::slug_fix($form->flug);
|
|
|
+ if ($form->slug != '') {
|
|
|
if (DistProductCategory::isRepeatedSlug($id, $form->slug)) {
|
|
|
|
|
|
return $form->response()->error(admin_trans_label('url_repeated'));
|