- Added new model "SubscriberList"
- Added has_many_through relations to the new model + Subscriber model - Added tests - Fixed syntax in other models This closes #95
This commit is contained in:
@@ -20,11 +20,11 @@ class Setting extends Model {
|
||||
}
|
||||
|
||||
public static function createOrUpdate($model) {
|
||||
$exists = Setting::where('name', $model['name'])
|
||||
$exists = self::where('name', $model['name'])
|
||||
->find_one();
|
||||
|
||||
if($exists === false) {
|
||||
$new_model = Setting::create();
|
||||
$new_model = self::create();
|
||||
$new_model->hydrate($model);
|
||||
return $new_model->save();
|
||||
}
|
||||
|
Reference in New Issue
Block a user