Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
danharrin committed Mar 23, 2021
1 parent 83c229e commit f06b3de
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 42 deletions.
12 changes: 0 additions & 12 deletions src/Commands/Aliases/MakeUpgradeCommand.php

This file was deleted.

30 changes: 0 additions & 30 deletions src/Commands/MakeUpgradeCommand.php

This file was deleted.

42 changes: 42 additions & 0 deletions src/Commands/UpgradeCommand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php

namespace Filament\Commands;

use Illuminate\Console\Command;
use Illuminate\Support\Str;

class UpgradeCommand extends Command
{
use Concerns\CanManipulateFiles;

protected $description = 'Upgrade Filament to the latest version.';

protected $signature = 'filament:upgrade';

public function handle()
{
$commands = [
'composer update',
'php artisan migrate',
'php artisan livewire:discover',
'php artisan route:clear',
'php artisan view:clear',
];

$bar = $this->output->createProgressBar(count($commands));

$bar->start();

foreach ($commands as $command) {
$this->newLine(2);
system($command);

$bar->advance();
}

$bar->finish();

$this->newLine(2);
$this->info('Successfully upgraded!');
}
}
1 change: 1 addition & 0 deletions src/FilamentServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ protected function bootCommands()
Commands\MakeThemeCommand::class,
Commands\MakeUserCommand::class,
Commands\MakeWidgetCommand::class,
Commands\UpgradeCommand::class,
]);

$aliases = [];
Expand Down

0 comments on commit f06b3de

Please sign in to comment.