This commit is contained in:
root 2020-01-27 15:51:05 +08:00
parent a60d68a13f
commit 5fae1f2bd8

View File

@ -25,7 +25,7 @@ class OrderController extends Controller
{
$model = Order::where('user_id', $request->session()->get('id'))
->orderBy('created_at', 'DESC');
if ($request->input('status')) {
if (!empty($request->input('status'))) {
$model->where('status', $request->input('status'));
}
$order = $model->get();