1
我下面的查詢:Laravel 5:如何將參數傳遞給內部哪裏查詢
$visible = array(1,2,3);
$views = DB::table('ims_view')
->Where(function($query) {
$query->where('iv_status', 1)->whereIn('id', $visible);
})->orderBy('iv_name', 'asc')->get();
Error: Undefined variable: visible
如何通過variabnle到內哪裏?