Created
April 8, 2016 15:46
-
-
Save bmadigan/3c04e24d820339a3467a9470775a4f85 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Build out the query based on the form filter request | |
$contractQuery = Contract::where('id', '>', '1'); // get all contracts | |
if($request->get('company') != '') { | |
$contractQuery->where('mpb_company', $request->get('company')); | |
} | |
if($request->get('status') != '') { | |
$contractQuery->where('status', $request->get('status')); | |
} | |
$results = $contractQuery->get(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment