123456789101112131415161718192021222324 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Support\Facades\DB;
- class Vest extends Model
- {
- protected $table = 'vest';
- public $timestamps = false;
- /*
- * 根据马甲id 查找马甲头像
- */
- public static function get_img_by_id($id)
- {
- $http = config('constants.HOST_URL');
- $vset = DB::table('vest')->where('id',$id)->first();
- $vest = (array)$vset;
- $img = $http.$vest['img'];
- return $img;
- }
- }
|