Skip to content

Commit

Permalink
Merge pull request #171 from Quiss/main
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
andrey-helldar authored Jun 11, 2024
2 parents d8863a2 + b0751e4 commit dd44cdb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,17 @@ Create your first operation using `php artisan make:operation` console command a
perform.

```php
use App\Models\Article;
use DragonCode\LaravelDeployOperations\Operation;

return new class extends Operation {
public function __invoke(): void
{
// any actions
Article::query()
->lazyById(chunkSize: 100, column: 'id')
->each->update(['is_active' => true]);

// and/or any actions...
}
};
```
Expand Down

0 comments on commit dd44cdb

Please sign in to comment.