```javascript // Bad practice ❌ (breaks if enum class changes or is removed) $table->enum('role', array_column(Can::cases(), 'value')); // oh boy… don't do this to yourself. // Good idea! ✅ (values explicitly defined, stable and independent) $table->enum('role', ['access_user','admin']); Now that’s better - right? And who knows what other surprises might await us if we keep referencing our business layer in migrations… thoughts anyone?!
Source:
https://dev.to/andreluizlunelli/keep-code-references-out-of-your-migrations-3pd