goszowski / stub
Installs: 15
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/goszowski/stub
Requires
- php: >=5.6.0
This package is auto-updated.
Last update: 2025-10-08 10:13:40 UTC
README
stub
Generate file from stub
Installation
composer require goszowski\stub
Usage
<?php use Goszowski\Stub\Stub; $stub = new Stub; $stub->load('/path/to/stub/file'); $stub->replace('some_1', 'other_1'); $stub->replace('some_2', 'other_2'); // OR WITH ARRAY $stub->replace([ 'some_1' => 'other_1', 'some_2' => 'other_2', ]); $stub->store('/path/to/save/file', 'filename');
Usage in Laravel
<?php namsepace App\YourNamespace; use Facades\ { Goszowski\Stub\Stub }; $stub = Stub::load('/path/to/stub/file'); $stub->replace('some_1', 'other_1'); $stub->replace('some_2', 'other_2'); // OR WITH ARRAY $stub->replace([ 'some_1' => 'other_1', 'some_2' => 'other_2', ]); $stub->store('/path/to/save/file', 'filename');