0

this is my migration code..... or schema you can say

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('to');
        $table->string('from');
       // $table->string('email')->unique();
        $table->string('mobile')->nullable();
        $table->rememberToken();
        $table->timestamps();
    });
}

the Error is shown up when i run this on laravel :

5
  • Your code is not readable. Please read stackoverflow.com/help/how-to-ask Commented Dec 17, 2016 at 7:13
  • now you can check i think its better now Commented Dec 17, 2016 at 7:54
  • When is this error occurring? Give some more detail about the error. Check in your laravel.log. Commented Dec 17, 2016 at 8:06
  • ok let me check Commented Dec 17, 2016 at 8:28
  • bro i dont understand what to do in log file i m new to the Laravel and i want to store the data to the database and this error occur i have to update the value in database and fetch it into the laravel panel that is install already Commented Dec 17, 2016 at 8:38

1 Answer 1

1
<?php

 use Illuminate\Database\Schema\Blueprint;
 use Illuminate\Database\Migrations\Migration;

class CreateUsersTable extends Migration
{
  public function up()
{
   Schema::create('users', function (Blueprint $table) {
    $table->increments('id');
    $table->string('to');
    $table->string('from');
    $table->string('mobile')->nullable();
    $table->rememberToken();
    $table->timestamps();
  });
}

 public function down()
 {
  Schema::drop('users');
 }
}

try to use this code, Also check setting of database related in env file and database.php

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.