intrip / laravel-authentication-acl

Laravel authentication and ACL admin panel package based on sentry
287 stars 110 forks source link

Foreign key checks error #141

Closed adifaidz closed 8 years ago

adifaidz commented 8 years ago

I got this error when trying to add a user

SQLSTATE[42000]: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Incorrect syntax near '='.

I'm using the sqlsrv driver, i tried to add 'sqlsrv' to the driver list in DBHelper class and it works for now. Is this a good way to do it or not? Sorry, I'm pretty new to github

intrip commented 8 years ago

Can you post the code example?

adifaidz commented 8 years ago
<?php  namespace LaravelAcl\Authentication\Helpers;

use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\DB;
use PDO;

class DbHelper
{
    /**
     * Drivers that doesn't support foreign keys check
     * @var array
     */
    public static $no_foreign_keys_drivers = ['sqlite', 'pgsql', 'sqlsrv'];

I added the sqlsrv to the $no_foreign_keys_drivers

intrip commented 8 years ago

Closing this then