php artisan make:migration table_name_here
Only generates the migration file/class and its stubbed methods up()/down(). You need to code out your schema.
https://laravel.com/docs/5.4/migrations#migration-structure
public function up()
{
Schema::create('companies', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->timestamps();
});
}
When your schema is done within the up() method, you can then run the migration with
php artisan migrate
Migration only creates the Migration Class. You need to create the schema by yourself in the up function. It's easy. You can get a sample schema from the documentation.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community