Search
 
SCRIPT & CODE EXAMPLE
 

PHP

laravel migration set default value

$table->string('name')->default('Hello World!');
Comment

laravel migration change default value

Schema::table('users', function ($table) {
    $table->integer('active')->default(0)->change();
});
Comment

laravel migration change column default

Schema::table('users', function ($table) {
    $table->integer('active')->default(0)->change();
});
Comment

how assign default value to laravel migration column

You can use change() method:

Schema::table('users', function ($table) {
    $table->integer('active')->default(0)->change();
});
Comment

PREVIOUS NEXT
Code Example
Php :: laravel add utility class 
Php :: convert string to array laravel 
Php :: remove space from start and end of string in php 
Php :: php serverpath 
Php :: join cakphp 
Php :: wordpress disable file mods 
Php :: get categories wordpress query 
Php :: php get values that exist in both arrays 
Php :: get today datetime in php 
Php :: php multi type parameter php multi type parameter 
Php :: php intl 
Php :: PHP Warning: Version warning: Imagick was compiled against Image Magick version 1654 but version 1650 is loaded. 
Php :: global laravel request() 
Php :: method put laravel 
Php :: Invalid request (Unsupported SSL request) 
Php :: php array length 
Php :: call to a member function connection() on null test laravel 
Php :: explode in php 
Php :: php instance class from string 
Php :: Could not find package laravel/ with stability stable. 
Php :: get header respnse code php curl 
Php :: malformed utf-8 characters possibly incorrectly encoded php 
Php :: replace accent php 
Php :: php case switch 
Php :: laravel route group name 
Php :: Failed to authenticate on SMTP server with username 
Php :: laravel Command "laravel/ui" is not defined. 
Php :: strval in php 
Php :: php imap install 
Php :: return back in blade laravel 
ADD CONTENT
Topic
Content
Source link
Name
1+7 =