芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/qrafiqxcreativeagency.com/accounts/office/app/Http/Requests/SubTask/StoreSubTask.php
task_id); $startDate = $task->start_date->format($setting->date_format); $dueDate = !is_null($task->due_date) ? $task->due_date->format($setting->date_format) : ''; $rules = [ 'title' => 'required', ]; $dueDateRule = 'nullable|date_format:"' . $setting->date_format . '"|after_or_equal:' . $startDate; !is_null($task->due_date) ? $dueDateRule . '|before_or_equal:' . $task->due_date : $dueDateRule; if ($task->due_date) { $dueDate = $task->due_date->format($setting->date_format); $dueDateRule .= '|before_or_equal:' . $dueDate; } $rules['start_date'] = $dueDateRule; $rules['due_date'] = !is_null(request()->start_date) ? ($dueDateRule . '|after_or_equal:' . Carbon::createFromFormat($setting->date_format, request()->start_date)->format($setting->date_format)) : $dueDateRule; return $rules; } }