This commit is contained in:
Pig Fang 2019-08-09 10:13:55 +08:00
parent 3f42d9dfc9
commit fab3da8f7f
6 changed files with 9 additions and 13 deletions

View File

@ -5,7 +5,7 @@ namespace App\Console\Commands;
use App\Models\User; use App\Models\User;
use Illuminate\Console\Command; use Illuminate\Console\Command;
class ExecuteInstallation extends Command class BsInstallCommand extends Command
{ {
protected $signature = 'bs:install {email} {password} {nickname}'; protected $signature = 'bs:install {email} {password} {nickname}';
@ -27,11 +27,7 @@ class ExecuteInstallation extends Command
$this->call('jwt:secret', ['--no-interaction' => true]); $this->call('jwt:secret', ['--no-interaction' => true]);
$this->call('passport:keys', ['--no-interaction' => true]); $this->call('passport:keys', ['--no-interaction' => true]);
$siteUrl = url('/'); option(['site_url' => url('/')]);
if (ends_with($siteUrl, '/index.php')) {
$siteUrl = substr($siteUrl, 0, -10);
}
option(['site_url' => $siteUrl]);
$admin = new User; $admin = new User;
$admin->email = $this->argument('email'); $admin->email = $this->argument('email');

View File

@ -5,7 +5,7 @@ namespace App\Console\Commands;
use App\Services\PluginManager; use App\Services\PluginManager;
use Illuminate\Console\Command; use Illuminate\Console\Command;
class DisablePlugin extends Command class PluginDisableCommand extends Command
{ {
/** /**
* The name and signature of the console command. * The name and signature of the console command.

View File

@ -5,7 +5,7 @@ namespace App\Console\Commands;
use App\Services\PluginManager; use App\Services\PluginManager;
use Illuminate\Console\Command; use Illuminate\Console\Command;
class EnablePlugin extends Command class PluginEnableCommand extends Command
{ {
/** /**
* The name and signature of the console command. * The name and signature of the console command.

View File

@ -17,9 +17,9 @@ class Kernel extends ConsoleKernel
Commands\SaltRandomCommand::class, Commands\SaltRandomCommand::class,
Commands\MigratePlayersTable::class, Commands\MigratePlayersTable::class,
Commands\MigrateCloset::class, Commands\MigrateCloset::class,
Commands\ExecuteInstallation::class, Commands\BsInstallCommand::class,
Commands\RegressLikesField::class, Commands\RegressLikesField::class,
Commands\EnablePlugin::class, Commands\PluginEnableCommand::class,
Commands\DisablePlugin::class, Commands\PluginDisableCommand::class,
]; ];
} }

View File

@ -4,7 +4,7 @@ namespace Tests;
use App\Services\PluginManager; use App\Services\PluginManager;
class DisablePluginTest extends TestCase class PluginDisableCommandTest extends TestCase
{ {
public function testDisablePlugin() public function testDisablePlugin()
{ {

View File

@ -4,7 +4,7 @@ namespace Tests;
use App\Services\PluginManager; use App\Services\PluginManager;
class EnablePluginTest extends TestCase class PluginEnableCommandTest extends TestCase
{ {
public function testEnablePlugin() public function testEnablePlugin()
{ {