在SELECT中包括实际上不在数据库laravel

时间:2018-10-06 11:45:53

标签: php laravel

我正在尝试执行包含静态字符串值列的SELECT语句。我在普通的SQL查询中知道它,但是如何在laravel查询生成器中做到这一点?我尝试了如下...

select('uprn','client_job_number','apt_date','00:00:00 as apt_time','timeslot','created_at')

但没有成功。我想将apt_time设置为00:00:00作为静态数据。我不知道该怎么做。

1 个答案:

答案 0 :(得分:1)

使用//count how much divs with the class .col-lg are inside #looped var counting = $("#looped .col-lg").length; console.log(counting); //If statement that works; if (counting == 12 ) { insideLoop.append('<div class="col-12 col-sm-6 col-md-4 col-lg servicios d-flex flex-column mt-sm-3 justify-content-center align-items-center"></div><div class="col-12 col-sm-6 col-md-4 col-lg servicios d-flex flex-column mt-sm-3 justify-content-center align-items-center"></div>'); } //But i wanted to start from number 3 - 6 - 9 - 12 etc... 方法。

尝试:

DB::raw
相关问题