mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
Merge pull request #4526 from shuvroroy/feat/console-ui-improvement
This commit is contained in:
@@ -113,10 +113,10 @@ class MakePageCommand extends Command
|
||||
$this->copyStubToApp('PageView', $viewPath);
|
||||
}
|
||||
|
||||
$this->info("Successfully created {$page}!");
|
||||
$this->components->info("Successfully created {$page}!");
|
||||
|
||||
if ($resource !== null) {
|
||||
$this->info("Make sure to register the page in `{$resourceClass}::getPages()`.");
|
||||
$this->components->info("Make sure to register the page in `{$resourceClass}::getPages()`.");
|
||||
}
|
||||
|
||||
return static::SUCCESS;
|
||||
|
||||
@@ -136,9 +136,9 @@ class MakeRelationManagerCommand extends Command
|
||||
'tableHeaderActions' => $this->indentString($tableHeaderActions, 4),
|
||||
]);
|
||||
|
||||
$this->info("Successfully created {$managerClass}!");
|
||||
$this->components->info("Successfully created {$managerClass}!");
|
||||
|
||||
$this->info("Make sure to register the relation in `{$resource}::getRelations()`.");
|
||||
$this->components->info("Make sure to register the relation in `{$resource}::getRelations()`.");
|
||||
|
||||
return static::SUCCESS;
|
||||
}
|
||||
|
||||
@@ -213,7 +213,7 @@ class MakeResourceCommand extends Command
|
||||
]);
|
||||
}
|
||||
|
||||
$this->info("Successfully created {$resource}!");
|
||||
$this->components->info("Successfully created {$resource}!");
|
||||
|
||||
return static::SUCCESS;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ class MakeUserCommand extends Command
|
||||
protected function sendSuccessMessage(Authenticatable $user): void
|
||||
{
|
||||
$loginUrl = route('filament.auth.login');
|
||||
$this->info('Success! ' . ($user->getAttribute('email') ?? $user->getAttribute('username') ?? 'You') . " may now log in at {$loginUrl}.");
|
||||
$this->components->info('Success! ' . ($user->getAttribute('email') ?? $user->getAttribute('username') ?? 'You') . " may now log in at {$loginUrl}.");
|
||||
|
||||
if ($this->getUserModel()::count() === 1 && $this->confirm('Would you like to show some love by starring the repo?', true)) {
|
||||
if (PHP_OS_FAMILY === 'Darwin') {
|
||||
@@ -49,7 +49,7 @@ class MakeUserCommand extends Command
|
||||
exec('start https://github.com/filamentphp/filament');
|
||||
}
|
||||
|
||||
$this->line('Thank you!');
|
||||
$this->components->info('Thank you!');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -116,10 +116,10 @@ class MakeWidgetCommand extends Command
|
||||
$this->copyStubToApp('WidgetView', $viewPath);
|
||||
}
|
||||
|
||||
$this->info("Successfully created {$widget}!");
|
||||
$this->components->info("Successfully created {$widget}!");
|
||||
|
||||
if ($resource !== null) {
|
||||
$this->info("Make sure to register the widget in `{$resourceClass}::getWidgets()`, and then again in `getHeaderWidgets()` or `getFooterWidgets()` of any `{$resourceClass}` page.");
|
||||
$this->components->info("Make sure to register the widget in `{$resourceClass}::getWidgets()`, and then again in `getHeaderWidgets()` or `getFooterWidgets()` of any `{$resourceClass}` page.");
|
||||
}
|
||||
|
||||
return static::SUCCESS;
|
||||
|
||||
@@ -20,9 +20,9 @@ class InstallCommand extends Command
|
||||
$filesystem->delete(resource_path('js/bootstrap.js'));
|
||||
$filesystem->copyDirectory(__DIR__ . '/../../stubs/scaffolding', base_path());
|
||||
|
||||
$this->info('Scaffolding installed successfully.');
|
||||
$this->components->info('Scaffolding installed successfully.');
|
||||
|
||||
$this->comment('Please run `npm install && npm run dev` to compile your new assets.');
|
||||
$this->components->info('Please run `npm install && npm run dev` to compile your new assets.');
|
||||
|
||||
return static::SUCCESS;
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ class MakeFieldCommand extends Command
|
||||
$this->copyStubToApp('FieldView', $viewPath);
|
||||
}
|
||||
|
||||
$this->info("Successfully created {$field}!");
|
||||
$this->components->info("Successfully created {$field}!");
|
||||
|
||||
return static::SUCCESS;
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ class MakeLayoutComponentCommand extends Command
|
||||
$this->copyStubToApp('LayoutComponentView', $viewPath);
|
||||
}
|
||||
|
||||
$this->info("Successfully created {$component}!");
|
||||
$this->components->info("Successfully created {$component}!");
|
||||
|
||||
return static::SUCCESS;
|
||||
}
|
||||
|
||||
@@ -20,9 +20,9 @@ class InstallCommand extends Command
|
||||
$filesystem->delete(resource_path('js/bootstrap.js'));
|
||||
$filesystem->copyDirectory(__DIR__ . '/../../stubs/scaffolding', base_path());
|
||||
|
||||
$this->info('Scaffolding installed successfully.');
|
||||
$this->components->info('Scaffolding installed successfully.');
|
||||
|
||||
$this->comment('Please run `npm install && npm run dev` to compile your new assets.');
|
||||
$this->components->info('Please run `npm install && npm run dev` to compile your new assets.');
|
||||
|
||||
return static::SUCCESS;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ class MakeSettingsPageCommand extends Command
|
||||
'settingsClass' => $settingsClass,
|
||||
]);
|
||||
|
||||
$this->info("Successfully created {$page}!");
|
||||
$this->components->info("Successfully created {$page}!");
|
||||
|
||||
return static::SUCCESS;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ trait CanManipulateFiles
|
||||
{
|
||||
foreach ($paths as $path) {
|
||||
if ($this->fileExists($path)) {
|
||||
$this->error("{$path} already exists, aborting.");
|
||||
$this->components->error("{$path} already exists, aborting.");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ trait CanValidateInput
|
||||
);
|
||||
|
||||
if ($validator->fails()) {
|
||||
$this->error($validator->errors()->first());
|
||||
$this->components->error($validator->errors()->first());
|
||||
|
||||
$input = $this->validateInput($callback, $field, $rules);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ class UpgradeCommand extends Command
|
||||
$this->call($command);
|
||||
}
|
||||
|
||||
$this->info('Successfully upgraded!');
|
||||
$this->components->info('Successfully upgraded!');
|
||||
|
||||
return static::SUCCESS;
|
||||
}
|
||||
|
||||
@@ -20,9 +20,9 @@ class InstallCommand extends Command
|
||||
$filesystem->delete(resource_path('js/bootstrap.js'));
|
||||
$filesystem->copyDirectory(__DIR__ . '/../../stubs/scaffolding', base_path());
|
||||
|
||||
$this->info('Scaffolding installed successfully.');
|
||||
$this->components->info('Scaffolding installed successfully.');
|
||||
|
||||
$this->comment('Please run `npm install && npm run dev` to compile your new assets.');
|
||||
$this->components->info('Please run `npm install && npm run dev` to compile your new assets.');
|
||||
|
||||
return static::SUCCESS;
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ class MakeColumnCommand extends Command
|
||||
$this->copyStubToApp('ColumnView', $viewPath);
|
||||
}
|
||||
|
||||
$this->info("Successfully created {$column}!");
|
||||
$this->components->info("Successfully created {$column}!");
|
||||
|
||||
return static::SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user