Skip to content

Commit e209732

Browse files
update
1 parent b41e2ee commit e209732

File tree

3 files changed

+46
-22
lines changed

3 files changed

+46
-22
lines changed

README.md

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,14 @@ was pretty tough. So i decided to create a much more easier way of communicating
1717
* [Requirements](#requirements)
1818
* [Installation](#installation)
1919
* [Instantiate](#instantiate)
20-
* [Init.php File](#init.php-file)
20+
* [Init php](#init-php)
21+
* [Tame Cli](#tame-cli)
22+
* [Tame Cli Scaffold](#tame-cli-scaffold)
23+
* [Tame Cli DB](#tame-cli-db)
24+
* [Tame Cli Migrate](#tame-cli-migrate)
25+
* [Tame Cli Make](#tame-cli-make)
26+
* [Tame Cli Key](#tame-cli-key)
27+
* [Tame Artisan Call](#tame-artisan-call)
2128
* [BootLoader](#bootLoader)
2229
* [Database Connection](#database-connection)
2330
* [Database Disconnect](#database-disconnect)
@@ -196,24 +203,43 @@ require_once __DIR__ . '/vendor/autoload.php';
196203
use Tamedevelopers\Database\AutoLoader;
197204

198205
AutoLoader::start();
199-
200206
// then reload your browser to allow the system scalfold for you
201207
```
202208

203-
## Init.php File
209+
## init php
204210
- [optional] This will extends the `composer autoload` and other setup
205211
- If you used the package `Package scalfolding` this file will be
206212
automatically generated, that you can include at the beginning of your project.
207213

208-
| Description |
209-
|-----------------------------------------------------------------------------------------------|
210-
| Once application is started! You can choose to include the `init.php` |
211-
| The file includes all configuration needed and as well extends the `vendor/autoload.php` path.|
212214

215+
## Tame Cli
216+
- Custom support for CLI commands
217+
218+
```bash
219+
php tame list
220+
```
221+
222+
### tame-cli-scaffold
223+
- Scalffold the database files, instead of running `AutoLoader::start()` in browser.
224+
- The `-f|--force` flag is needed if you're inside a framework or if on production server.
225+
- This doesn't alter nor replace any files that exists and safe.
226+
227+
```bash
228+
php tame scaffold:run --force
229+
```
230+
231+
### tame-artisan-call
232+
- Using the CLI from within php, withing the CMD interface.
233+
234+
```php
235+
use Tamedevelopers\Support\Capsule\Artisan;
236+
237+
Artisan::call('db:wipe --force');
238+
```
213239

214240
## BootLoader
215-
- If you do not want to include or use the `init.php` file
216-
- All you need do is call the bootloader, to start the database life-circle.
241+
- [optional] from `version ^6.0.3` If you do not want to include or use the `init.php` file
242+
- You can as well call the bootloader, to start the database life-circle.
217243

218244
```php
219245
use Tamedevelopers\Database\Capsule\AppManager;
@@ -226,7 +252,7 @@ AppManager::bootLoader();
226252
- Take two param as `[$name|$options]`
227253
- Mandatory `$name` as string of connection name
228254
- [optional] `$options` and an array, if no connection data is found
229-
- First navigate to [config/database.php] file and add connection configuration
255+
- First navigate to [config/database.php] file and add connection configuration or use .env
230256

231257
```php
232258
DB::connection('connName', $options);

src/Console/Commands/DBCommand.php

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -153,15 +153,13 @@ public function wipe()
153153

154154
$this->forceChecker();
155155

156-
if(!$force){
157-
// prompt for confirmation before proceeding
158-
$confirm = $this->confirm('Proceed with db:wipe?');
159-
160-
// ask once
161-
if (!$confirm) {
162-
$this->warning("Command aborted.");
163-
return;
164-
}
156+
// prompt for confirmation before proceeding
157+
$confirm = $this->confirm('Proceed with db:wipe?');
158+
159+
// ask once
160+
if (!$confirm) {
161+
$this->warning("Command aborted.");
162+
return;
165163
}
166164

167165
$tables = $this->getTables();

src/Console/Commands/ScaffoldCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function handle()
2626
}
2727

2828
/**
29-
* App scalffolding
29+
* App scaffolding
3030
* Subcommand: php tame scaffold:run
3131
*/
3232
public function run()
@@ -52,10 +52,10 @@ public function run()
5252
return;
5353
}
5454

55-
// scalffolding database manager
55+
// scaffolding database manager
5656
AutoLoader::start();
5757

58-
$this->info("App scalffolding Manager has been successfully runned!");
58+
$this->info("App scaffolding Manager has been successfully runned!");
5959
}
6060

6161
}

0 commit comments

Comments
 (0)