user()->isAdmin(); } public function rules() { return [ 'start_date' => 'date', 'end_date' => 'date', ]; } protected function prepareForValidation() { $input = $this->all(); if(!array_key_exists('start_date', $input)) $input['start_date'] = now()->subDays(20); if(!array_key_exists('end_date', $input)) $input['end_date'] = now(); $this->replace($input); } }