<?php

namespace App\Models;
use Illuminate\Support\Facades\DB;
class Moneytransfer extends BaseModel
{
	protected $table = 'money_transfer';
	public $timestamps = false;
	
    function moneytransferlist($list = 10, $page, $where = '')
    {
    	if (is_array ($where) && count ($where) > 0) { 
    		$data = $this->select($this->table.'.*')->orderby($this->table.'.id','desc')->where($where)->paginate ($list); 
    	}else{
    		$data = $this->select($this->table.'.*')->orderby($this->table.'.id','desc')->paginate ($list); 
    	}
    	for ($i=0; $i < count($data); $i++) { 
    		$data[$i]->auth_expire = date("Y-m-d",$data[$i]->auth_expire);
    	}
    	return $data->toArray (); 
    }

}