public function postStep1()
    {
        $postData = Binput::all();

        $v = Validator::make($postData, $this->rulesStep1);

        $v->sometimes('env.mail_host', 'required', function ($input) {
            return $input->env['mail_driver'] === 'smtp';
        });

        $v->sometimes(['env.mail_address', 'env.mail_password'], 'required', function ($input) {
            return !in_array($input->env['mail_driver'], ['log', 'smtp']);
        });

        $v->sometimes(['env.mail_username'], 'required', function ($input) {
            return !in_array($input->env['mail_driver'], ['sendmail', 'log']);
        });

        if ($v->passes()) {
            return Response::json(['status' => 1]);
        }

        return Response::json(['errors' => $v->getMessageBag()], 400);
    }