add offers count, & minor fixes code standards

This commit is contained in:
Ludovic CANDELLIER
2021-11-01 16:26:31 +01:00
parent e97f54f126
commit 18f1f8a13a
66 changed files with 526 additions and 574 deletions

View File

@@ -40,7 +40,7 @@ class Comments
public static function getClass($model)
{
return 'App\Models\\' . str_replace('.','\\', $model);
return 'App\Models\\' . str_replace('.', '\\', $model);
}
public static function getByModel($model)
@@ -66,7 +66,7 @@ class Comments
unset($data['_token']);
$data['commentable_type'] = Comments::getClass($data['commentable_type']);
$data['commentable_id'] = (int) $data['commentable_id'];
return $id ? self::update($data, $id) : self::create($data);
return $id ? self::update($data, $id) : self::create($data);
}
public static function create($data)
@@ -83,7 +83,7 @@ class Comments
$model = self::get($id);
$model->update($data);
return $model;
}
}
public static function deleteComments($model)
{
@@ -94,5 +94,4 @@ class Comments
{
return true;
}
}