MoneyBuyMatch.php 531 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: scstf
  5. * Date: 2018/9/28
  6. * Time: 20:05
  7. */
  8. namespace App\Models;
  9. use Illuminate\Database\Eloquent\Model;
  10. class MoneyBuyMatch extends Model
  11. {
  12. protected $table='money_buy_match';
  13. public function getByAttrs($where,$orderArray=[]){
  14. if (empty($order)){
  15. $datas = $this->where($where)->get();
  16. }else{
  17. $datas = $this->where($where)->orderby($orderArray['orderby'],$orderArray['order'])->get();
  18. }
  19. return $datas ;
  20. }
  21. }