1
我有一個問題,使用LARAVEL VALIDATION。laravel validation with delete_at
我希望deleted_at
爲空,但我得到deleted_at
= NULL
'level_name' => 'unique:company_levels,level_name,' . $id . ',id,company_id,' . $company_id.',deleted_at,null',
它生成一個查詢像下面
select count(*) as aggregate from `company_level` where `level_name` = 'Chennai' and `id` <> 1 and `company_id` = 3 and `deleted_at` = null
這是不符合我的需要
。
我需要生成類似下面
select count(*) as aggregate from `company_level` where `level_name` = 'Chennai' and `id` <> 1 and `company_id` = 3 and `deleted_at` is null
由於查詢提前