Search
 
SCRIPT & CODE EXAMPLE
 

PHP

laravel default string length migration

$table->string('name', 800);
Comment

laravel migration string length

//Add this code to your AppServiceProvider
use IlluminateDatabaseSchemaBuilder;


public function boot()
{
    Builder::defaultStringLength(191);
}
Comment

laravel migration string 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 :: cmd run php file 
Php :: Write a php program to perform sum of two numbers 
Php :: Override the route parameter names 
Php :: @method overide form laravel 
Php :: Eager realationship in laravel 
Php :: php public folder 
Php :: append single quote around variable in php string 
Php :: PHP OOP - Destructor 
Php :: laravel move/rename file ftp 
Php :: php convert float 
Php :: laravel collection contains 
Php :: wc php product_cat thumbnail 
Php :: get 1 data from get laravel 
Php :: heap sort php 
Php :: rest api php 
Php :: wc php get acf fields product category 
Php :: make php website https 
Php :: Calculate Math Expression From A String Text With PHP 
Php :: composer require rtconner/laravel-tagging 
Php :: php user ip from post request 
Php :: Get the current script file name 
Php :: custom blade directive 
Php :: laravel how to query belongsTo relationship 
Php :: mysql between all months days even null 
Php :: docker php-fpm-apline add imagick 
Php :: laravel add many to many 
Php :: laravel collection nth method 
Php :: php else 
Php :: send email php form 
Php :: get current content type 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =