GuidePolicy.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. namespace App\Console\Commands;
  3. use App\Api\Util\IM;
  4. use Illuminate\Console\Command;
  5. use App\Models\AppSettings;
  6. use App\Models\Users;
  7. class GuidePolicy extends Command
  8. {
  9. use IM;
  10. /**
  11. * The name and signature of the console command.
  12. *
  13. * @var string
  14. */
  15. protected $signature = 'love:GuidePolicy';
  16. /**
  17. * The console command description.
  18. *
  19. * @var string
  20. */
  21. protected $description = '';
  22. /**
  23. * Create a new command instance.
  24. *
  25. * @return void
  26. */
  27. public function __construct()
  28. {
  29. parent::__construct();
  30. }
  31. /**
  32. * Execute the console command.
  33. *
  34. * @return mixed
  35. */
  36. public function handle()
  37. {
  38. $list=Users::all();
  39. foreach ($list as $k=>$v) {
  40. $x= $this->portrait_set($v->id,['Tag'=>'Tag_Profile_IM_AllowType','Value'=>'AllowType_Type_AllowAny']);
  41. $this->info("id=".$v->id.'----'.json_encode($x));
  42. }
  43. $this->info("over");
  44. $startOfMonth = Carbon::now()->subDays(2)->startOfday();
  45. $endOfMonth = Carbon::now()->yesterday()->startOfday();
  46. $this->info("over=".$startOfMonth);
  47. $this->info("over".$endOfMonth);
  48. }
  49. }