mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 17:49:11 +08:00
feature: fuzzy search
This commit is contained in:
parent
644aedb999
commit
d500769bd7
@ -19,7 +19,7 @@ class UserController extends Controller
|
||||
$sort = $request->input('sort') ? $request->input('sort') : 'created_at';
|
||||
$userModel = User::orderBy($sort, $sortType);
|
||||
if ($request->input('email')) {
|
||||
$userModel->where('email', $request->input('email'));
|
||||
$userModel->where('email', 'like', '%' . $request->input('email') . '%');
|
||||
}
|
||||
if ($request->input('invite_user_id')) {
|
||||
$userModel->where('invite_user_id', $request->input('invite_user_id'));
|
||||
|
@ -119,7 +119,7 @@ class OrderService
|
||||
private function orderIsUsed(Order $order):bool
|
||||
{
|
||||
$month = self::STRTOTIME[$order->cycle];
|
||||
$orderExpireDay = strtotime('+'. $month . ' month', $order->created_at->timestamp);
|
||||
$orderExpireDay = strtotime('+' . $month . ' month', $order->created_at->timestamp);
|
||||
if ($orderExpireDay < time()) return true;
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user