Commit 289abc04 by 杨树贤

修复删除integral_type表之后的bug

parent 48660cee
Showing with 1 additions and 7 deletions
...@@ -24,15 +24,9 @@ class Integral extends Model ...@@ -24,15 +24,9 @@ class Integral extends Model
return $filters->apply($query); return $filters->apply($query);
} }
public function integralType()
{
return $this->belongsTo(IntegralType::class, 'integral_type_id', 'id');
}
public function getIntegralList($page, $pageSize, $filter) public function getIntegralList($page, $pageSize, $filter)
{ {
$integrals = Integral::with('integralType:id,name') $integrals = Integral::filter($filter)
->filter($filter)
->page($page, $pageSize) ->page($page, $pageSize)
->orderBy('id', 'desc') ->orderBy('id', 'desc')
->get()->toArray(); ->get()->toArray();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment