Skip to content

Commit

Permalink
Merge pull request #1 from Sinevia/patch-2
Browse files Browse the repository at this point in the history
Update AdvancedModel.php
  • Loading branch information
lesichkovm authored Dec 9, 2017
2 parents 6842720 + fb74b50 commit b76577a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/AdvancedModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ public static function boot() {
});
}

public static function chunks($perChunk) {
$total = static::count();
$numChunks = ceil($total / $perChunk);
return $numChunks;
}

public static function getConnName() {
$o = new static;
return $o->connection;
}

public static function getTableName() {
return (new static)->getTable();
}
Expand Down

0 comments on commit b76577a

Please sign in to comment.