Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[12.x] Provide a default client name to avoid QueryException #1746

Closed

Conversation

imahmood
Copy link

Creating a new client without specifying a name throws the following exception:

   Illuminate\Database\QueryException

  SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'name' cannot be null

  at vendor/laravel/framework/src/Illuminate/Database/Connection.php:829
    825$this->getName(), $query, $this->prepareBindings($bindings), $e
    826▕                 );
    827▕             }
    828▕
  ➜ 829throw new QueryException(
    830$this->getName(), $query, $this->prepareBindings($bindings), $e
    831▕             );
    832▕         }
    833▕     }

      +27 vendor frames

@taylorotwell
Copy link
Member

Just provide a name.

@imahmood imahmood deleted the bugfix/prevent-null-client-name branch May 23, 2024 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants