I have a query like this in Laravel Query Builder-
$baseQuery = DB::table( 'project');
//$startDate="2015-09-02" - This format
//$endtDate="2014-08-02" - This format
if(!empty($startDate))
$baseQuery = $baseQuery->where('project.completion_date', '>', $startDate);
if(!empty($endData))
$baseQuery = $baseQuery->where('project.completion_date', '<', $endData);
But it is not working perfectly, can anyone help me please by telling what I am doing wrong?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire