casting enabled attribute
This commit is contained in:
parent
2d7c18bae5
commit
b8af19c910
@ -76,7 +76,7 @@ abstract class BulkAction
|
||||
$items = $this->getSelectedRecords($request);
|
||||
|
||||
foreach ($items as $item) {
|
||||
$item->enabled = 1;
|
||||
$item->enabled = true;
|
||||
$item->save();
|
||||
}
|
||||
}
|
||||
@ -93,7 +93,7 @@ abstract class BulkAction
|
||||
$items = $this->getSelectedRecords($request);
|
||||
|
||||
foreach ($items as $item) {
|
||||
$item->enabled = 0;
|
||||
$item->enabled = false;
|
||||
$item->save();
|
||||
}
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ class DisableCommand extends Command
|
||||
return;
|
||||
}
|
||||
|
||||
if ($this->model->enabled == 0) {
|
||||
if (!$this->model->enabled) {
|
||||
$this->comment("Module [{$this->alias}] is already disabled.");
|
||||
return;
|
||||
}
|
||||
@ -43,7 +43,7 @@ class DisableCommand extends Command
|
||||
$this->changeRuntime();
|
||||
|
||||
// Update db
|
||||
$this->model->enabled = 0;
|
||||
$this->model->enabled = false;
|
||||
$this->model->save();
|
||||
|
||||
$this->createHistory('disabled');
|
||||
|
@ -35,7 +35,7 @@ class EnableCommand extends Command
|
||||
return;
|
||||
}
|
||||
|
||||
if ($this->model->enabled == 1) {
|
||||
if ($this->model->enabled) {
|
||||
$this->comment("Module [{$this->alias}] is already enabled.");
|
||||
return;
|
||||
}
|
||||
@ -43,7 +43,7 @@ class EnableCommand extends Command
|
||||
$this->changeRuntime();
|
||||
|
||||
// Update db
|
||||
$this->model->enabled = 1;
|
||||
$this->model->enabled = true;
|
||||
$this->model->save();
|
||||
|
||||
$this->createHistory('enabled');
|
||||
|
Loading…
x
Reference in New Issue
Block a user