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
@@ -683,7 +697,7 @@ This method is intended to be used when defining the columns necessary for a pol
683
697
684
698
The `nullableTimestamps` method is an alias of the [timestamps](#column-method-timestamps) method:
685
699
686
-
$table->nullableTimestamps(0);
700
+
$table->nullableTimestamps(precision: 0);
687
701
688
702
<aname="column-method-nullableMorphs"></a>
689
703
#### `nullableMorphs()` {.collection-method}
@@ -737,23 +751,23 @@ The `smallInteger` method creates a `SMALLINT` equivalent column:
737
751
<aname="column-method-softDeletesTz"></a>
738
752
#### `softDeletesTz()` {.collection-method}
739
753
740
-
The `softDeletesTz` method adds a nullable `deleted_at``TIMESTAMP` (with timezone) equivalent column with an optional precision (total digits). This column is intended to store the `deleted_at` timestamp needed for Eloquent's "soft delete" functionality:
754
+
The `softDeletesTz` method adds a nullable `deleted_at``TIMESTAMP` (with timezone) equivalent column with an optional fractional seconds precision. This column is intended to store the `deleted_at` timestamp needed for Eloquent's "soft delete" functionality:
The `softDeletes` method adds a nullable `deleted_at``TIMESTAMP` equivalent column with an optional precision (total digits). This column is intended to store the `deleted_at` timestamp needed for Eloquent's "soft delete" functionality:
761
+
The `softDeletes` method adds a nullable `deleted_at``TIMESTAMP` equivalent column with an optional fractional seconds precision. This column is intended to store the `deleted_at` timestamp needed for Eloquent's "soft delete" functionality:
The `string` method creates a `VARCHAR` equivalent column of the given length:
755
769
756
-
$table->string('name', 100);
770
+
$table->string('name', length: 100);
757
771
758
772
<aname="column-method-text"></a>
759
773
#### `text()` {.collection-method}
@@ -762,47 +776,51 @@ The `text` method creates a `TEXT` equivalent column:
762
776
763
777
$table->text('description');
764
778
779
+
When utilizing MySQL or MariaDB, you may apply a `binary` character set to the column in order to create a `BLOB` equivalent column:
780
+
781
+
$table->text('data')->charset('binary'); // BLOB
782
+
765
783
<aname="column-method-timeTz"></a>
766
784
#### `timeTz()` {.collection-method}
767
785
768
-
The `timeTz` method creates a `TIME` (with timezone) equivalent column with an optional precision (total digits):
786
+
The `timeTz` method creates a `TIME` (with timezone) equivalent column with an optional fractional seconds precision:
769
787
770
-
$table->timeTz('sunrise', $precision = 0);
788
+
$table->timeTz('sunrise', precision: 0);
771
789
772
790
<aname="column-method-time"></a>
773
791
#### `time()` {.collection-method}
774
792
775
-
The `time` method creates a `TIME` equivalent column with an optional precision (total digits):
793
+
The `time` method creates a `TIME` equivalent column with an optional fractional seconds precision:
776
794
777
-
$table->time('sunrise', $precision = 0);
795
+
$table->time('sunrise', precision: 0);
778
796
779
797
<aname="column-method-timestampTz"></a>
780
798
#### `timestampTz()` {.collection-method}
781
799
782
-
The `timestampTz` method creates a `TIMESTAMP` (with timezone) equivalent column with an optional precision (total digits):
800
+
The `timestampTz` method creates a `TIMESTAMP` (with timezone) equivalent column with an optional fractional seconds precision:
783
801
784
-
$table->timestampTz('added_at', $precision = 0);
802
+
$table->timestampTz('added_at', precision: 0);
785
803
786
804
<aname="column-method-timestamp"></a>
787
805
#### `timestamp()` {.collection-method}
788
806
789
-
The `timestamp` method creates a `TIMESTAMP` equivalent column with an optional precision (total digits):
807
+
The `timestamp` method creates a `TIMESTAMP` equivalent column with an optional fractional seconds precision:
790
808
791
-
$table->timestamp('added_at', $precision = 0);
809
+
$table->timestamp('added_at', precision: 0);
792
810
793
811
<aname="column-method-timestampsTz"></a>
794
812
#### `timestampsTz()` {.collection-method}
795
813
796
-
The `timestampsTz` method creates `created_at` and `updated_at``TIMESTAMP` (with timezone) equivalent columns with an optional precision (total digits):
814
+
The `timestampsTz` method creates `created_at` and `updated_at``TIMESTAMP` (with timezone) equivalent columns with an optional fractional seconds precision:
797
815
798
-
$table->timestampsTz($precision = 0);
816
+
$table->timestampsTz(precision: 0);
799
817
800
818
<aname="column-method-timestamps"></a>
801
819
#### `timestamps()` {.collection-method}
802
820
803
-
The `timestamps` method creates `created_at` and `updated_at``TIMESTAMP` equivalent columns with an optional precision (total digits):
821
+
The `timestamps` method creates `created_at` and `updated_at``TIMESTAMP` equivalent columns with an optional fractional seconds precision:
804
822
805
-
$table->timestamps($precision = 0);
823
+
$table->timestamps(precision: 0);
806
824
807
825
<aname="column-method-tinyIncrements"></a>
808
826
#### `tinyIncrements()` {.collection-method}
@@ -825,6 +843,10 @@ The `tinyText` method creates a `TINYTEXT` equivalent column:
825
843
826
844
$table->tinyText('notes');
827
845
846
+
When utilizing MySQL or MariaDB, you may apply a `binary` character set to the column in order to create a `TINYBLOB` equivalent column:
0 commit comments