1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <?php
- namespace App\Console\Commands;
- use App\Models\Meta;
- use BlockMatrix\EosRpc\ChainFactory;
- use BlockMatrix\EosRpc\EosRpc;
- use BlockMatrix\EosRpc\WalletFactory;
- use Carbon\Carbon;
- use GuzzleHttp\Client;
- use Illuminate\Console\Command;
- use Illuminate\Support\Facades\Log;
- use Illuminate\Support\Facades\Storage;
- use Org\Multilinguals\Apollo\Client\ApolloClient;
- use ZanySoft\Zip\Zip;
- class Qrcode extends Command
- {
- /**
- * The name and signature of the console command.
- *
- * @var string
- */
- protected $signature = 'qrcode';
- /**
- * The console command description.
- *
- * @var string
- */
- protected $description = '重新生成二维码';
- protected $save_dir = '';
- /**
- * Create a new command instance.
- *
- * @return void
- */
- public function __construct()
- {
- parent::__construct();
- }
- /**
- * Execute the console command.
- *
- * @return mixed
- */
- public function handle()
- {
- $this->line('-----------start---------');
- $metas = Meta::all();
- foreach ($metas as $meta) {
- $this->line('------开始:' . $meta['patch_num']);
- Storage::put('chsy/qrcodes/'.$meta['patch_num'].'.png',\SimpleSoftwareIO\QrCode\Facades\QrCode::size(200)->generate("http://uptoyo.com/".$meta['id']));
- }
- $this->line('-----------end--------');
- }
- }
|