vigneshc91 / laravel-validation-generator

Validation generator for laravel project based on the table structure
https://vigneshc91.github.io/laravel-validation-generator
MIT License
3 stars 4 forks source link

Enum Field Issue #1

Open Anisi opened 5 years ago

Anisi commented 5 years ago

Hello It doesn't recognise enum fields! Unknown database type enum requested, Doctrine\DBAL\Platforms\MySQL57Platform may not support it

coatesap commented 5 years ago

I believe it's a problem with Doctrine's DBAL library which this package depends on. An easy work-around is to add the following code to your AppServiceProvider's register method:


if ($this->app->environment() == 'local') {
    DB::getDoctrineSchemaManager()
        ->getDatabasePlatform()
        ->registerDoctrineTypeMapping('enum', 'string');
}