cyrildewit / eloquent-viewable

Associate views with Eloquent models in Laravel
MIT License
803 stars 104 forks source link

feat: add recordMany function #272

Open mauri870 opened 2 years ago

cyrildewit commented 2 years ago

What would be a use case for this?

mauri870 commented 2 years ago

@cyrildewit One use case is when migrating from a different solution to yours, for example from a integer column views count to the eloquent-viewable package. We need to seed the views count we already have and using views($viewable)->record() does an insert per view so it's extremely slow, where as recordMany insert multiple rows with a single insert query.