current state
This commit is contained in:
@@ -13,13 +13,13 @@ class TodayInHistoryController extends Controller
|
||||
$hits = 39;
|
||||
|
||||
try {
|
||||
$base = DB::connection('legacy')->table('featured_works as t0')
|
||||
$base = DB::table('featured_works as t0')
|
||||
->leftJoin('artworks as t1', 't0.artwork_id', '=', 't1.id')
|
||||
->join('artworks_categories as t2', 't1.category', '=', 't2.category_id')
|
||||
->join('categories as t2', 't1.category', '=', 't2.id')
|
||||
->where('t1.approved', 1)
|
||||
->whereRaw('MONTH(t0.post_date) = MONTH(CURRENT_DATE())')
|
||||
->whereRaw('DAY(t0.post_date) = DAY(CURRENT_DATE())')
|
||||
->select('t1.id', 't1.name', 't1.picture', 't1.uname', 't1.category', 't2.category_name');
|
||||
->select('t1.id', 't1.name', 't1.picture', 't1.uname', 't1.category', DB::raw('t2.name as category_name'));
|
||||
|
||||
$artworks = $base->orderBy('t0.post_date','desc')->paginate($hits);
|
||||
} catch (\Throwable $e) {
|
||||
|
||||
Reference in New Issue
Block a user