Skip to content

Commit f53e976

Browse files
Update basic.md
1 parent d8103b2 commit f53e976

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docs/guide/basic.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,17 @@ You can also specify a name for the file yourself by specifying it with the firs
1515
For example, `php artisan make:operation qwerty`.
1616

1717
```php
18+
use App\Models\Article;
1819
use DragonCode\LaravelDeployOperations\Operation;
1920

2021
return new class extends Operation {
2122
public function __invoke(): void
2223
{
23-
// any actions
24+
Article::query()
25+
->lazyById(chunkSize: 100, column: 'id')
26+
->each->update(['is_active' => true]);
27+
28+
// and/or any actions...
2429
}
2530
};
2631
```

0 commit comments

Comments
 (0)