You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,8 +11,10 @@ You are free to place it anywhere else, just change the namespace accordingly.
11
11
## Usage
12
12
13
13
*This example is for a default Laravel (5.4) Model within the "App" namespace.*
14
+
14
15
You need an (ideally unsigned) integer field in your database which will store the properties.
15
16
The length does depend on the number of values you would like to store. You only need one bit per value, so it's 8 values for each byte, if the column is unsigned.
17
+
16
18
Examples (based on laravel migrations):
17
19
```php
18
20
$table->tinyInteger('status'); // 1 byte -> maximum of 7 different values
@@ -28,6 +30,7 @@ There are only a few use-cases, but you can add as many fields as you like.
0 commit comments