Search
 
SCRIPT & CODE EXAMPLE
 

PHP

long text in laravel migration

Schema::create('posts', function ($table) {
    $table->increments('id');
    $table->integer('user_id');
    // ...
    $table->longText('description');
    // ...
}
Comment

laravel migration mediumtext length

For Laravel & Mysql

String types
CHAR - 1 to 191 (trailing spaces removed)
STRING - 1 to 16,300 (user defined)
TEXT - 1 to 65,535
MEDIUMTEXT - 1 to 16,777,215
LONGTEXT - 1 to 4,294,967,295

Integer types
TINYINT - 0 to 255 (unsigned) | -128 to 127 (signed)
SMALLINT - 0 to 65,535 (unsigned) | -32,768 to 32,767 (signed)
MEDIUMINT - 0 to 16,777,215 (unsigned) | -8,388,608 to 8,388,607 (signed)
INT - 0 to 4,294,967,295 (unsigned) | -2,147,483,648 to 2,147,483,647 (signed)
BIGINT - 0 to 18,446,744,073,709,551,615 (unsigned) | -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 (signed)

Floating types
Structure: `([max decimal places], [max precision])`
FLOAT - ([0-7], [0-23])
DOUBLE - ([0-14], [24-53])
DECIMAL - ([0-65], [0-30])
Comment

PREVIOUS NEXT
Code Example
Php :: check all php version installed ubuntu 
Php :: laravel model tablename 
Php :: phpexcel set width 
Php :: redirect http to https htaccess laravel 8 
Php :: how to validate an email field using php 
Php :: only date in php 
Php :: numbric validate laravel 
Php :: laravel where created_at today 
Php :: php regex replace all non alphanumeric characters 
Php :: php limit string length 
Php :: php convert date and time to iso 8601 
Php :: php read file line by line 
Php :: get current datatime laravel 
Php :: composer ignore platform reqs 
Php :: drupal 8 get all nodes of type 
Php :: laravel logout 
Php :: str slug laravel 
Php :: php does property exist 
Php :: php sum array key 
Php :: use app name in laravel blade 
Php :: +1 month php 
Php :: wordpress custom theme style.css 
Php :: laravel foreach loop index 
Php :: string contains php 
Php :: wordpress if is in category 
Php :: php current file name 
Php :: php remove nbsp from string 
Php :: get taxonomy name in singhle post 
Php :: curl error handling 
Php :: old value in laravel 
ADD CONTENT
Topic
Content
Source link
Name
2+5 =