| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- namespace App\Models;
- use Illuminate\Support\Facades\DB;
- /**
- *
- */
- class LotteryMoney extends BaseModel {
- protected $table = "lottery_money";
- public $timestamps = false;
- function getlist($list = 10, $where = '') {
- $data = $this->orderBy('sort', 'desc');
- if (!empty($where) && is_array($where)) {
- $data = $data->where($where);
- }
- $data = $data->paginate($list);
- if (!$data) {
- return -4010010022; //没有数据
- }
- return $data->toArray();
- }
- public function getLotteryList(){
- $data = $this->orderBy('sort', 'desc')->get();
- if (!$data) {
- return -4010010022; //没有数据
- }
- return $data->toArray();
- }
- public function gLotteryList($type){
- $data = $this->select('type')->where('type',$type)->first();
- if (!$data) {
- return -4010010022; //没有数据
- }
- return $data->toArray();
- }
- }
|