Skip to content

Commit 630275a

Browse files
committed
Updated truncate confirmation message and package readme.
1 parent ca418f3 commit 630275a

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ php artisan migrate
4545

4646
## Console Command
4747

48-
Run the console command to fill the calendar table.
48+
The calendar table command accepts two optional parameters. If no **start** year is specified you will be prompted to enter one. If no **end** year is specified the current year will be used.
4949

50-
> Note: The calendar table command accepts two optional parameters. If no **start** year is specified you will be prompted to enter one. If no **end** year is specified the current year will be used.
50+
> Note: If the table has been pre-filled you will be given the option to truncate.
5151
5252
```
5353
php artisan calendar:table --start=1990 --end=2030

src/Commands/CalendarTableCommand.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99
/**
1010
* Class CalendarTableCommand
11-
*
12-
* @package TomShaw\CalendarTable\Commands
1311
*/
1412
class CalendarTableCommand extends Command
1513
{
@@ -76,7 +74,7 @@ public function handle()
7674
}
7775

7876
if ($this->count()) {
79-
if ($this->confirm('Do you wish to truncate the table')) {
77+
if ($this->confirm('Table is currently filled would you like to run the truncate command')) {
8078
$this->truncate();
8179
} else {
8280
return;

tests/CommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function test_it_asks_to_truncate_database_when_not_empty()
6767

6868
// Arrange: Insert data into the database expect confirmation
6969
$this->artisan($this->consoleCommand)
70-
->expectsQuestion('Do you wish to truncate the table', 'yes')
70+
->expectsQuestion('Table is currently filled would you like to run the truncate command', 'yes')
7171
->assertExitCode(0);
7272
}
7373
}

0 commit comments

Comments
 (0)