Reputation: 1235
I am currently learning Laravel 5 and am experimenting with user logins and registration.
I used the command:
php artisan make:migration create_users_table --create=users
the first time i ran this command it worked perfectly and created a migration file with a selection of fields typically required for users, such as email, password etc.
I ran into some trouble and had to delete and recreate my migration files whilst troubleshooting. However now I am unable to get the same result when running the command. I just get the default:
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUserTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('users');
}
}
could someone help?
Thanks
Upvotes: 1
Views: 700
Reputation: 23
There is default migration file for users. I think you have not check after installing the laravel. Check the default migration file in github bellow
Upvotes: 1
Reputation: 1235
I think i made a mistake and mistook the default migration files included in laravel with the ones i generated.
The CreateUsersTable is a predefined migration file that gives all the standard fields a user record would require.
Thanks
Upvotes: 0
Reputation: 763
Try this out and see if it works for you
php artisan make:migration create_users_table --create=users
Upvotes: 0