Closed iwex closed 7 years ago
@Omranic no, it only listens for https://github.com/rinvex/repository/blob/develop/src/Repositories/EloquentRepository.php#L198 events. So, should I create new models only through $repository->create()
?
Namely:
$entities = factory(App\User::class, 3)->make();
$entities->each(function (User $user) use ($repo) {
$repo->create($user->toArray());
});
Well, that's something outside the scope of this package then. Maybe you've to give the other package rinvex/cacheable a look which seems to be what you're looking for..
Why not to add possibility of cache clearing after creating/updating/deleting eloquent model? Or, how can I write Unit tests with
factory()->create()
?