@hirenkeraliya: Where/what is the error? you given code only?
No Worries!! create a file call 2014_10_12_000000_create_users_table.php
with below code and test it.
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('contact_number');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('users');
}
}
Read migration documentation for more.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community