for ($i = 0; $i < count($keyskill); $i++) {
if ($i == count($keyskill) - 1) {
$key .= "skills like '%" . $keyskill[$i] . "%' ";
} else {
$key .= "skills like '%" . $keyskill[$i] . "%' or ";
}
}
聽我的查詢是如何在此查詢中使用分頁編寫基於laravel模型?
$jobs = DB::select("SELECT * from post where ($key) and status=1 order by id desc");
如何編寫基於此查詢與分頁laravel模型???
你想要寫洋洋灑灑查詢或創建一個模型? –
只有查詢我有模型... –