Skip to content

Commit dc87e21

Browse files
committed
output info text only in cli mode
1 parent d9bb639 commit dc87e21

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Commands/GenerateRulesCommand.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,11 @@ private function checkTableAndColumns(string $table, array $columns = []): void
102102

103103
private function createOutput(string $table, array $rules): void
104104
{
105-
$this->info("Schema-based validation rules for table \"$table\" have been generated!");
106-
$this->info('Copy & paste these to your controller validation or form request or where ever your validation takes place:');
105+
if (app()->runningInConsole()) {
106+
$this->info("Schema-based validation rules for table \"$table\" have been generated!");
107+
$this->info('Copy & paste these to your controller validation or form request or where ever your validation takes place:');
108+
}
109+
107110
$this->line($this->format($rules));
108111
}
109112

0 commit comments

Comments
 (0)