Skip to content

Commit

Permalink
Update basic.md
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey-helldar authored Jun 11, 2024
1 parent d8103b2 commit f53e976
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/guide/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,17 @@ You can also specify a name for the file yourself by specifying it with the firs
For example, `php artisan make:operation qwerty`.

```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 f53e976

Please sign in to comment.