You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
460 B
15 lines
460 B
<?php
|
|
|
|
use App\Models\Business;
|
|
use Illuminate\Support\Facades\DB;
|
|
use Illuminate\Support\Facades\Artisan;
|
|
|
|
Artisan::command('business:reset', function () {
|
|
Business::first()->update([
|
|
'wallet' => 10000,
|
|
'calculated_at' => now()->subMonth(2),
|
|
]);
|
|
$this->call('cache:clear');
|
|
DB::statement('TRUNCATE TABLE `costs` ');
|
|
DB::statement('TRUNCATE TABLE `notifications`');
|
|
})->purpose('Reset the businesses after test cost:work');
|