Search
 
SCRIPT & CODE EXAMPLE
 

PHP

laravel migration change column name

Schema::table('users', function (Blueprint $table) {
    $table->renameColumn('from', 'to');
});
Comment

migration rename column laravel

php artisan make:migration rename_author_id_in_posts_table --table=posts
Comment

migration rename column laravel

public function up()
{
    Schema::table('posts', function (Blueprint $table) {
        $table->renameColumn('author_ID', 'user_id');
    });
}
Comment

migration rename column laravel

public function down()
{
    Schema::table('posts', function (Blueprint $table) {
        $table->renameColumn('user_id', 'author_ID');
    });
}
Comment

PREVIOUS NEXT
Code Example
Php :: beautify var_dump 
Php :: php json_encode encode not escape forward slash 
Php :: laravel get random row 
Php :: unzip file php 
Php :: laravel eloquent get 10 records 
Php :: php yesterday 
Php :: insert php mysql 
Php :: switch case php 
Php :: install php7.4 linux 
Php :: woocommerce change place order button text 
Php :: in random order laravel 
Php :: wordpress custom loop latest first 
Php :: format uang rupiah di php 
Php :: Get PHP Date Time Difference in Days, Hours, Minutes, and Seconds 
Php :: default sort yii2 
Php :: get all pages list from specific template 
Php :: setup_postdata not working 
Php :: php date today plus 1 month 
Php :: wordpress add class on navigation menu 
Php :: Drupal 9 cache killer kill switch 
Php :: Script timeout passed, if you want to finish import 
Php :: carbon time ago laravel 
Php :: php Access-Control-Allow-Origin 
Php :: php regex remove characters from string 
Php :: laravel request validation boolean 
Php :: php escape special characters 
Php :: php remove last character from string 
Php :: php debug telegram bot 
Php :: custom bootstrap pagination laravel 
Php :: used resoure route how to add another route 
ADD CONTENT
Topic
Content
Source link
Name
1+7 =