Closed skalero01 closed 4 years ago
Sorry, found the problem, i fixed it with this:
public function cleanUp(CleanupConfig $config): void
{
$config->olderThan(now()->subMonth())
->scope(function($query) {
$query->where(function($query) {
$query->where('causer_type', 'like', '%SystemReport%')->orWhereNull('causer_type');
});
});
}
Regards
I have the next code on my model
But when executing php artisan
clean:models
is removing all the rows that gets with the scope function without checking thecreated_at
column.It works if i change the code to this:
Is this normal behavior? I am using the last version available