Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
forecho committed Feb 2, 2018
1 parent 25d55cb commit 167fe79
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,4 +256,24 @@ class ActionStoreSearch extends ActionStore
}
}
}
```

**resetCounter**

get user model_id count

```php
ActionStore::resetCounter(
ActionStoreSearch::FAVORITE_TYPE,
['model' => Company::tableName(), 'model_id' => $company->id, 'user_id' => \Yii::$app->user->id]
);
```

get all model_id count

```php
ActionStore::resetCounter(
ActionStoreSearch::FAVORITE_TYPE,
['model' => Company::tableName(), 'model_id' => $company->id]
);
```

0 comments on commit 167fe79

Please sign in to comment.