We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b95d2a7 commit 50258ceCopy full SHA for 50258ce
README.md
@@ -312,6 +312,23 @@ LaravelStub::from(__DIR__ . 'model.stub')
312
->generateIf(true);
313
```
314
315
+<a name="generate-unless"></a>
316
+### `generateUnless`
317
+
318
+If you want to generate a stub file if given boolean expression evaluates to `false`, you can use the `generateIf` method:
319
320
+```php
321
+LaravelStub::from(__DIR__ . 'model.stub')
322
+ ->to(__DIR__ . '/App')
323
+ ->name('new-model')
324
+ ->ext('php')
325
+ ->replaces([
326
+ 'NAMESPACE' => 'App',
327
+ 'CLASS' => 'Milwad'
328
+ ])
329
+ ->generateUnless(true);
330
+```
331
332
<a name="contributors"></a>
333
## Contributors
334
0 commit comments