add column to migration laravel
class AddProfileToUsers extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->string('profile')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('shop_users', function (Blueprint $table) {
$table->dropColumn(['profile']);
});
}
}php artisan make:migration add_profile_to_users
Also in PHP:
- create project larave
- database date time format in php
- Arr::get laravel
- Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, string given in
- check aall routes laravel
- ext-dom install php 7.4
- add new column in existing table in laravel migration
- How to see if there is a - in a string in php
- contains functin php
- check if word belongs in string
- Difference between echo and print statement in php
- clear cache swr
- database connectivity in php
- check if array has a key php
- check if current page is home url wordpress
- disable wordpress updates
- find all files in directory php
- combine date time php
- append single qoute arounf variable in php string
- breaking long array in php
- file upload in php through ajax
- delete in wordpress query
- check a word in a string
- create random_str laravel