add whereNotInOrder() to repository

This commit is contained in:
Nabeel Shahzad
2018-04-16 16:33:41 -05:00
parent 63c5d69e10
commit 0965465601
2 changed files with 26 additions and 3 deletions

View File

@@ -190,9 +190,7 @@ class PirepController extends Controller
$this->pirepRepo->pushCriteria($criterea);
$pireps = $this->pirepRepo
->findWhere(['status', '!=', PirepState::CANCELLED])
->findWhere(['status', '!=', PirepState::DRAFT])
->orderBy('created_at', 'desc')
->whereNotInOrder('status', [PirepState::CANCELLED, PirepState::DRAFT], 'created_at', 'desc')
->paginate();
return view('admin.pireps.index', [