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 Apr 11, 2024
1 parent 56d742d commit 23399b3
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- [`ext`](#ext)
- [`replace`](#replace)
- [`replaces`](#replaces)
- [`moveStub`](#move-stub)
- [`download`](#download)
- [`generate`](#generate)
- [Contributors](#contributors)
Expand Down Expand Up @@ -161,6 +162,25 @@ LaravelStub::from(__DIR__ . 'model.stub')
]);
```

<a name="move-stub"></a>
### `moveStub`

By default, `Laravel Stub` create a copy from your stub file and move it to destination path.If you may to move the current stub file, you can use `moveStub` method:

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

After run this code, the `model.stub` didn't exists.

<a name="download"></a>
### `download`

Expand Down

0 comments on commit 23399b3

Please sign in to comment.