Base.php 358 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace App\Services\QQMiniApp;
  3. use App\Models\Common\TokenModel;
  4. class Base
  5. {
  6. protected $app_id;
  7. public function __construct($app_id = '1109365561')
  8. {
  9. $this->app_id = $app_id;
  10. }
  11. protected function getAccessToken()
  12. {
  13. return TokenModel::where('user_name', $this->app_id)->value('access_token');
  14. }
  15. }