12345678910111213141516171819202122232425 |
- <?php
- namespace App\Http\Models;
- use Illuminate\Database\Eloquent\Model;
- use DB;
- class WechatGroupApi extends Model
- {
- protected $table = 'wechat_group_apis';
- protected $guarded = ['id'];
- static function get_group_api($group_nick){
- $group_apis = self::where('group_nick',$group_nick)->get()->toarray();
- $result = array();
- if(!empty($group_apis)){
- foreach($group_apis as $group_api){
- $result[$group_api['api_nick']] = $group_api;
- }
- }
-
- return $result;
- }
-
- }
|