use Illuminate\Validation\Rule;
public function rules()
{
$rules = [
'name_eng'=>'required|string',
'field1' => [
'required',
Rule::unique('table_name')->where(function ($query) {
$query->where('field2', $this->get('field2'));
})
],
];
return $rules;
}
location / {
index index.html index.php;
}
index index.html index.php;
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}