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

Error creating crud #9

Open
lramirezq opened this issue Mar 10, 2024 · 1 comment
Open

Error creating crud #9

lramirezq opened this issue Mar 10, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@lramirezq
Copy link

I'm using

php artisan make:crud clients

with PostgreSQL :

Running Crud Generator ...

Already exist Controller. Do you want overwrite (y/n)? [y]:

y

Creating Controller ...
Creating Model ...

Illuminate\Database\QueryException

SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "FROM"
LINE 1: SHOW COLUMNS FROM clients
^ (Connection: pgsql, SQL: SHOW COLUMNS FROM clients)

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

  +23 vendor frames

24 artisan:35
Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

@DeivitMTK
Copy link

Hi,

I'm facing a similar issue working with SQL Server when running the php artisan make:crud products. The process fails to Create the Model with the following message:

Creating Model ...

Illuminate\Database\QueryException

SQLSTATE[42000]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Incorrect syntax near the keyword '
FROM'. (Connection: sqlsrv, SQL: SHOW COLUMNS FROM products)

Is there any update on how to fix this issue?

Thanks in advance!

@takielias takielias added the bug Something isn't working label Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants