save to codehub
This commit is contained in:
35
app/Console/Commands/UpdateTableColumnCommand.php
Normal file
35
app/Console/Commands/UpdateTableColumnCommand.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use DB;
|
||||
|
||||
class UpdateTableColumnCommand extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'update:column';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Update isactive column value by 1 daily 9AM';
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
DB::table('mood_o_meter')->update(['is_active' => '1']);
|
||||
|
||||
$this->info('Table column updated successfully.');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user