add offers count, & minor fixes code standards
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user