. */ declare(strict_types=1); namespace FireflyIII\Http\Requests; /** * Class ImportUploadRequest. */ class ImportUploadRequest extends Request { /** * @return bool */ public function authorize() { // Only allow logged in users return auth()->check(); } /** * @return array */ public function rules() { // fixed $types = array_keys(config('firefly.import_formats')); return [ 'import_file' => 'required|file', 'import_file_type' => 'required|in:' . join(',', $types), 'configuration_file' => 'file', ]; } }