File tree Expand file tree Collapse file tree 1 file changed +30
-1
lines changed
Expand file tree Collapse file tree 1 file changed +30
-1
lines changed Original file line number Diff line number Diff line change 88
99Here we will share some useful Laravel additions we need in our daily work.
1010
11- ### Useful Additions
11+ ### Traits
1212
1313- [ ` UsefulEnums ` ] ( #usefulenums )
1414- [ ` UsefulScopes ` ] ( #usefulscopes )
1515 - [ ` selectAllBut ` ] ( #selectallbut )
1616 - [ ` fromToday ` ] ( #fromtoday-fromyesterday )
1717 - [ ` fromYesterday ` ] ( #fromtoday-fromyesterday )
1818- [ ` RefreshDatabaseFast ` ] ( #refreshdatabasefast )
19+ -
20+ ### Commands
21+
22+ - [ ` db:truncate ` ] ( #db:truncate )
1923
2024## Installation
2125
@@ -33,6 +37,10 @@ php artisan vendor:publish --tag="useful-additions-config"
3337
3438## Usage
3539
40+ ---
41+
42+ ## Traits
43+
3644### UsefulEnums
3745
3846---
@@ -158,6 +166,27 @@ class MyTest extends TestCase
158166}
159167```
160168
169+ ## Commands
170+
171+ ### db: truncate
172+
173+ ---
174+
175+ This command truncates all the tables of your current database connection:
176+
177+ ``` bash
178+ php artisan db:truncate
179+ ```
180+ ```
181+ INFO Preparing database.
182+
183+ Truncating table: failed_jobs ......................................................................................................... 135ms DONE
184+ Truncating table: migrations ........................................................................................................... 87ms DONE
185+ Truncating table: password_reset_tokens ................................................................................................ 79ms DONE
186+ Truncating table: personal_access_tokens ............................................................................................... 86ms DONE
187+ Truncating table: users ................................................................................................................ 78ms DONE
188+ ```
189+
161190## Testing
162191
163192``` bash
You can’t perform that action at this time.
0 commit comments