Skip to content

Commit 495e863

Browse files
committed
add documentation
1 parent c187fdb commit 495e863

File tree

3 files changed

+93
-13
lines changed

3 files changed

+93
-13
lines changed

README.md

Lines changed: 91 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
[![Packagist](https://poser.pugx.org/guysolamour/command/d/total.svg)](https://packagist.org/packages/guysolamour/command)
99
[![Packagist](https://img.shields.io/packagist/l/guysolamour/command.svg)](https://packagist.org/packages/guysolamour/command)
1010

11-
Package description: CHANGE ME
11+
This package is a collection of artisan commands for speed up developpemt with laravel framework.
1212

1313
## Installation
1414

1515
Install via composer
1616
```bash
17-
composer require guysolamour/command
17+
composer require guysolamour/laravel-commands
1818
```
1919

2020
### Publish Configuration File
@@ -25,17 +25,97 @@ php artisan vendor:publish --provider="Guysolamour\Command\ServiceProvider" --ta
2525

2626
## Usage
2727

28-
CHANGE ME
2928

30-
## Security
29+
### Create Database Command
30+
```bash
31+
php artisan cmd:db:create
32+
```
33+
By default, the package will look for information at the **.env** file in the database section
3134

32-
If you discover any security related issues, please email
33-
instead of using the issue tracker.
35+
However, you can pass the name of the database
36+
```bash
37+
php artisan cmd:db:create {name}
38+
```
39+
40+
41+
Supported drivers are (mysql & sqlite).
42+
The connection can be changed with 'connection' option which is mysql by default.
43+
44+
45+
```bash
46+
php artisan cmd:db:create {name} --connection={mysql|sqlite}
47+
```
48+
For mysql driver, login credentials can be changed with the options below:
49+
50+
```bash
51+
php artisan cmd:db:create {name}
52+
--connection={mysql|sqlite}
53+
--username=root
54+
--password=root
55+
--port=3306
56+
```
57+
58+
### Drop Database Command
59+
```bash
60+
php artisan cmd:db:drop
61+
```
62+
By default, the package will look for information at the **.env** file in the database section
63+
64+
However, you can pass the name of the database.
65+
66+
```bash
67+
php artisan cmd:db:drop {name}
68+
```
69+
70+
Supported drivers are (mysql & sqlite).
71+
The connection can be changed with 'connection' option which is mysql by default.
72+
73+
```bash
74+
php artisan cmd:db:drop {name} --connection={mysql|sqlite}
75+
```
76+
For mysql driver, login credentials can be changed with the options below:
3477

35-
## Credits
78+
```bash
79+
php artisan cmd:db:drop {name}
80+
--connection={mysql|sqlite}
81+
--username=root
82+
--password=root
83+
--port=3306
84+
```
3685

37-
- [](https://github.com/guysolamour/command)
38-
- [All contributors](https://github.com/guysolamour/command/graphs/contributors)
86+
### Trait Command
87+
```bash
88+
php artisan cmd:make:trait {name}
89+
```
90+
Folder name can be changed with _'folder'_ option
91+
92+
```bash
93+
php artisan cmd:make:trait {name} --folder={folder}
94+
```
95+
96+
### Service Provider Command
97+
```bash
98+
php artisan cmd:make:provider {name}
99+
```
100+
Folder name can be changed with _'folder'_ option
101+
102+
```bash
103+
php artisan cmd:make:provider {name} --folder={folder}
104+
```
105+
106+
### Helper Command
107+
```bash
108+
php artisan cmd:make:helper {name}
109+
```
110+
Folder name can be changed with _'folder'_ option
111+
112+
```bash
113+
php artisan cmd:make:helper {name} --folder={folder}
114+
```
115+
116+
117+
## Security
118+
119+
If you discover any security related issues, please email
120+
instead of using the issue tracker.
39121

40-
This package is bootstrapped with the help of
41-
[melihovv/laravel-package-generator](https://github.com/melihovv/laravel-package-generator).

src/Console/Commands/Database/CreateDatabase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class CreateDatabase extends BaseCommand
1414
*
1515
* @var string
1616
*/
17-
protected $signature = 'commands:db:create
17+
protected $signature = 'cmd:db:create
1818
{database? : database name }
1919
{--u|username=root : database user }
2020
{--p|password=root : database password }

src/Console/Commands/Database/DropDatabase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
class DropDatabase extends BaseCommand
99
{
1010

11-
protected $signature = 'commands:db:drop
11+
protected $signature = 'cmd:db:drop
1212
{database? : database name }
1313
{--u|username=root : database user }
1414
{--p|password=root : database password }

0 commit comments

Comments
 (0)