Skip to content

Commit

Permalink
output info text only in cli mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Sairahcaz committed Oct 19, 2023
1 parent d9bb639 commit dc87e21
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Commands/GenerateRulesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,11 @@ private function checkTableAndColumns(string $table, array $columns = []): void

private function createOutput(string $table, array $rules): void
{
$this->info("Schema-based validation rules for table \"$table\" have been generated!");
$this->info('Copy & paste these to your controller validation or form request or where ever your validation takes place:');
if (app()->runningInConsole()) {
$this->info("Schema-based validation rules for table \"$table\" have been generated!");
$this->info('Copy & paste these to your controller validation or form request or where ever your validation takes place:');
}

$this->line($this->format($rules));
}

Expand Down

0 comments on commit dc87e21

Please sign in to comment.