Base.php 364 B

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