mardi 6 juin 2017

Laravel "getColumnListing" returns nothing

I'm currently work on two Laravel projects, one with MySQL, and the other with MS SQL Server. I'm trying to get the list of all the fields from a specified table. With MySQL, absolutely no problem, but SQL Server, the response is always an empty table.

I'm using this :

return Schema::getConnection()->getSchemaBuilder()->getColumnListing('dbo.CONCEPT ALU$Service Line');

or this :

return DB::connection()->getSchemaBuilder()->getColumnListing('dbo.CONCEPT ALU$Service Line');

They have the same effect. I know the table's name is ok because this :

return DB::connection()->getDoctrineColumn('dbo.CONCEPT ALU$Service Line', 'Document Type')->getName();

works perfectly. Any idea...? I'm kinda tired of searching everywhere on the web right now..



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire