Comments Updated
This commit is contained in:
parent
fa6b10987f
commit
ad08dc930b
|
|
@ -17,6 +17,13 @@ class DownChannelCommand extends OriginalCommand
|
||||||
{--secret= : The secret phrase that may be used to bypass maintenance mode}
|
{--secret= : The secret phrase that may be used to bypass maintenance mode}
|
||||||
{--status=503 : The status code that should be used when returning the maintenance mode response}';
|
{--status=503 : The status code that should be used when returning the maintenance mode response}';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The console command description.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $description = 'Down channel command. Same as parent but database will not update.';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute the console command.
|
* Execute the console command.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,11 @@ use Webkul\Core\Models\Channel;
|
||||||
|
|
||||||
class DownCommand extends OriginalCommand
|
class DownCommand extends OriginalCommand
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Execute the console command.
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
$this->downAllChannels();
|
$this->downAllChannels();
|
||||||
|
|
@ -14,6 +19,11 @@ class DownCommand extends OriginalCommand
|
||||||
parent::handle();
|
parent::handle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update all channels.
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
protected function downAllChannels()
|
protected function downAllChannels()
|
||||||
{
|
{
|
||||||
$this->comment('All channels are down.');
|
$this->comment('All channels are down.');
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@
|
||||||
namespace Webkul\Core\Console\Commands;
|
namespace Webkul\Core\Console\Commands;
|
||||||
|
|
||||||
use Illuminate\Foundation\Console\UpCommand as OriginalCommand;
|
use Illuminate\Foundation\Console\UpCommand as OriginalCommand;
|
||||||
use Webkul\Core\Models\Channel;
|
|
||||||
|
|
||||||
class UpChannelCommand extends OriginalCommand
|
class UpChannelCommand extends OriginalCommand
|
||||||
{
|
{
|
||||||
|
|
@ -14,6 +13,18 @@ class UpChannelCommand extends OriginalCommand
|
||||||
*/
|
*/
|
||||||
protected $name = 'channel:up';
|
protected $name = 'channel:up';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The console command description.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $description = 'Up channel command. Same as parent but database will not update.';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute the console command.
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
parent::handle();
|
parent::handle();
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,11 @@ use Webkul\Core\Models\Channel;
|
||||||
|
|
||||||
class UpCommand extends OriginalCommand
|
class UpCommand extends OriginalCommand
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Execute the console command.
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
$this->upAllChannels();
|
$this->upAllChannels();
|
||||||
|
|
@ -14,6 +19,11 @@ class UpCommand extends OriginalCommand
|
||||||
parent::handle();
|
parent::handle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update all channels.
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
protected function upAllChannels()
|
protected function upAllChannels()
|
||||||
{
|
{
|
||||||
$this->comment('Activating all channels.');
|
$this->comment('Activating all channels.');
|
||||||
|
|
|
||||||
|
|
@ -8,14 +8,6 @@ use Illuminate\Foundation\AliasLoader;
|
||||||
use Illuminate\Support\Facades\Event;
|
use Illuminate\Support\Facades\Event;
|
||||||
use Illuminate\Support\Facades\Validator;
|
use Illuminate\Support\Facades\Validator;
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
use Webkul\Core\Console\Commands\BagistoVersion;
|
|
||||||
use Webkul\Core\Console\Commands\BookingCron;
|
|
||||||
use Webkul\Core\Console\Commands\DownChannelCommand;
|
|
||||||
use Webkul\Core\Console\Commands\DownCommand;
|
|
||||||
use Webkul\Core\Console\Commands\ExchangeRateUpdate;
|
|
||||||
use Webkul\Core\Console\Commands\Install;
|
|
||||||
use Webkul\Core\Console\Commands\UpChannelCommand;
|
|
||||||
use Webkul\Core\Console\Commands\UpCommand;
|
|
||||||
use Webkul\Core\Core;
|
use Webkul\Core\Core;
|
||||||
use Webkul\Core\Exceptions\Handler;
|
use Webkul\Core\Exceptions\Handler;
|
||||||
use Webkul\Core\Facades\Core as CoreFacade;
|
use Webkul\Core\Facades\Core as CoreFacade;
|
||||||
|
|
@ -71,11 +63,11 @@ class CoreServiceProvider extends ServiceProvider
|
||||||
});
|
});
|
||||||
|
|
||||||
$this->app->extend('command.down', function () {
|
$this->app->extend('command.down', function () {
|
||||||
return new DownCommand;
|
return new \Webkul\Core\Console\Commands\DownCommand;
|
||||||
});
|
});
|
||||||
|
|
||||||
$this->app->extend('command.up', function () {
|
$this->app->extend('command.up', function () {
|
||||||
return new UpCommand;
|
return new \Webkul\Core\Console\Commands\UpCommand;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -109,7 +101,7 @@ class CoreServiceProvider extends ServiceProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register the console commands of this package
|
* Register the console commands of this package.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
@ -117,16 +109,16 @@ class CoreServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
if ($this->app->runningInConsole()) {
|
if ($this->app->runningInConsole()) {
|
||||||
$this->commands([
|
$this->commands([
|
||||||
BagistoVersion::class,
|
\Webkul\Core\Console\Commands\BagistoVersion::class,
|
||||||
Install::class,
|
\Webkul\Core\Console\Commands\Install::class,
|
||||||
ExchangeRateUpdate::class,
|
\Webkul\Core\Console\Commands\ExchangeRateUpdate::class,
|
||||||
BookingCron::class,
|
\Webkul\Core\Console\Commands\BookingCron::class,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->commands([
|
$this->commands([
|
||||||
DownChannelCommand::class,
|
\Webkul\Core\Console\Commands\DownChannelCommand::class,
|
||||||
UpChannelCommand::class,
|
\Webkul\Core\Console\Commands\UpChannelCommand::class,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -134,7 +126,6 @@ class CoreServiceProvider extends ServiceProvider
|
||||||
* Register factories.
|
* Register factories.
|
||||||
*
|
*
|
||||||
* @param string $path
|
* @param string $path
|
||||||
*
|
|
||||||
* @return void
|
* @return void
|
||||||
* @throws \Illuminate\Contracts\Container\BindingResolutionException
|
* @throws \Illuminate\Contracts\Container\BindingResolutionException
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue