F
F
Franz_Crawl2014-03-09 15:04:45
Laravel
Franz_Crawl, 2014-03-09 15:04:45

Why don't migrations work in laravel?

Created a migration in laravel. I execute the artisan migrate command, and in response I get an Undefined property error: Illuminate\Database\Schema\Blueprint::$string
Here is a code snippet:

<?php

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

class CreateUsersTable extends Migration {

  /**
   * Run the migrations.
   *
   * @return void
   */
  public function up()
  {
        Schema::create('users', function(Blueprint $table) {
            $table->increments('id');
      $table->string('email')->unique();
      $table->string[60]('password');
      $table->string('username')->unique();
      $table->timestamps();
        });
  }
}

What's wrong?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ilya, 2014-08-29
@Franz_Crawl

Replace with $table->string('password',60);

V
Vyacheslav Redkin, 2014-03-09
@SlaF

$table->string[60]('password');
What is it?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question