Raw Expressions
使用Raw expression
$users = DB::table('users')
->select(DB::raw('count(*) as user_count, status'))
->where('status', '<>', 1)
->groupBy('status')
->get();衍伸範例
->where(DB::raw('IFNULL(advertsolution_m.start_date,1911/01/01)'),'<=',DATE_FORMAT($now,'Y/m/d'))另外的用法
->whereRaw('裡面放sql的語法字串')Last updated