Skip to content

Commit 8856b6f

Browse files
authored
Merge pull request #700 from ReWiG/patch-48
Update migrations.md
2 parents 8dea897 + dd00a2a commit 8856b6f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

migrations.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
git: fe846c64bc236ed39fbcd7da705602add79132f4
2+
git: bab1b28a63e72f9e51ad89995ef546058bc01bdc
33
---
44

55
# База данных · Миграции
@@ -646,6 +646,14 @@ $table->double('amount');
646646
$table->enum('difficulty', ['easy', 'hard']);
647647
```
648648

649+
Конечно, вы можете использовать метод `Enum::cases()` вместо ручного определения массива допустимых значений:
650+
651+
```php
652+
use App\Enums\Difficulty;
653+
654+
$table->enum('difficulty', Difficulty::cases());
655+
```
656+
649657
<a name="column-method-float"></a>
650658
#### `float()`
651659

0 commit comments

Comments
 (0)