Laravel Simple Month Selection
You could use the hide gem whereMonth
:
DB::table("ordenes")
->whereMonth('fecha', '=', '06')
->get();
I highly recommend to you read the Builder.php source to search for another gems. :) https://github.com/laravel/framework/blob/4.2/src/Illuminate/Database/Query/Builder.php
You may try whereRaw
method
$data = DB::table("ordenes")
// ...
->whereRaw('MONTH(fecha) = ?', [06])
// ...
->get();