Hi,
I have a little issue with my migration and enums.
According to the laravel documentations, I can define enum columns in the migration like this: $table->enum('column_name', Enum::cases()). But when I try to run it, it gives me this error:
at vendor\laravel\framework\src\Illuminate\Database\Grammar.php:235
231▕ if (is_array($value)) {
232▕ return implode(', ', array_map([$this, __FUNCTION__], $value));
233▕ }
234▕
➜ 235▕ return "'$value'";
236▕ }
237▕
238▕ /**
239▕ * Escapes a value for safe SQL embedding.
1 [internal]:0
Illuminate\Database\Grammar::quoteString(Object(App\Enums\PeopleType))
2 vendor\laravel\framework\src\Illuminate\Database\Grammar.php:232```
`app\Enums\PeopleTypes`:
```<?php
namespace App\Enums;
enum PeopleType: string
{
case ACTOR = 'actor';
case CREW = 'crew';
case INFLUENCER = 'influencer';
case OTHER = 'other';
}
The migration collumn in question:
$table->enum('type', PeopleType::cases())->default(PeopleType::OTHER);
I'm sorry if this is an amateur question. Thank you in advance for your help!