for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use Ffcms\Core\Migrations\MigrationInterface;
use Ffcms\Core\Migrations\Migration;
/**
* Class install_user_table.
*/
class install_user_table extends Migration implements MigrationInterface
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
{
* Execute actions when migration is up
* @return void
public function up()
$this->getSchema()->create('users', function($table) {
$table->increments('id');
$table->string('login')->unique();
$table->string('email')->unique();
$table->string('password', 512);
$table->tinyInteger('role_id')->default(2); // 1 = onlyRead(same as guest), 2 = user, 3 = moder, 4 = adm
$table->string('approve_token', 128)->nullable()->default(null);
$table->timestamps();
});
parent::up();
}
* Seed created table via up() method with some data
public function seed()
* Execute actions when migration is down
public function down()
$this->getSchema()->dropIfExists('users');
parent::down();
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.