| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- namespace App\Console\Commands;
- use App\Api\Util\IM;
- use Illuminate\Console\Command;
- use App\Models\AppSettings;
- use App\Models\Users;
- class GuidePolicy extends Command
- {
- use IM;
- /**
- * The name and signature of the console command.
- *
- * @var string
- */
- protected $signature = 'love:GuidePolicy';
- /**
- * The console command description.
- *
- * @var string
- */
- protected $description = '';
- /**
- * Create a new command instance.
- *
- * @return void
- */
- public function __construct()
- {
- parent::__construct();
- }
- /**
- * Execute the console command.
- *
- * @return mixed
- */
- public function handle()
- {
- $list=Users::all();
- foreach ($list as $k=>$v) {
- $x= $this->portrait_set($v->id,['Tag'=>'Tag_Profile_IM_AllowType','Value'=>'AllowType_Type_AllowAny']);
- $this->info("id=".$v->id.'----'.json_encode($x));
- }
- $this->info("over");
- $startOfMonth = Carbon::now()->subDays(2)->startOfday();
- $endOfMonth = Carbon::now()->yesterday()->startOfday();
- $this->info("over=".$startOfMonth);
- $this->info("over".$endOfMonth);
- }
- }
|