lcly-data-admin/app/ModelFilters/OperationLogFilter.php

25 lines
504 B
PHP

<?php
namespace App\ModelFilters;
use EloquentFilter\ModelFilter;
class OperationLogFilter extends ModelFilter
{
public function type($type){
return $this->where('type', $type);
}
public function user($user){
return $this->where('user_id', $user);
}
public function startTime($startTime){
return $this->where('created_at', '>=', $startTime);
}
public function endTime($endTime){
return $this->where('created_at', '<=', $endTime);
}
}