Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
milwad-dev committed Dec 6, 2024
1 parent b95d2a7 commit 50258ce
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,23 @@ LaravelStub::from(__DIR__ . 'model.stub')
->generateIf(true);
```

<a name="generate-unless"></a>
### `generateUnless`

If you want to generate a stub file if given boolean expression evaluates to `false`, you can use the `generateIf` method:

```php
LaravelStub::from(__DIR__ . 'model.stub')
->to(__DIR__ . '/App')
->name('new-model')
->ext('php')
->replaces([
'NAMESPACE' => 'App',
'CLASS' => 'Milwad'
])
->generateUnless(true);
```

<a name="contributors"></a>
## Contributors

Expand Down

0 comments on commit 50258ce

Please sign in to comment.