is there a migration for USER?
Issue #11
closed
just started using this component.
i was wondering is there a sample or code on USER table?
thanks
Comments (4)
-
-
I was wondering this, too!
There was a bit of trial and error getting this right for me - I didn't change the defaults in the db.php config, and ended up just adding fields (and fillable) until anvard was happy. So I needed:
<?php use Illuminate\Database\Migrations\Migration; class CreateUsersTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('users', function($table) { $table->increments('id'); $table->string('username'); $table->string('role_id'); $table->string('email')->unique(); $table->string('password'); $table->string('password_confirmation'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('users'); } }
I'm look forward to comprehending the subtleties!
-
Anvard does not have a user model (which is a good thing) and allows you to use your own.
I use https://github.com/Zizaco/confide... and it works very well together.
-
- changed status to closed
- Log in to comment
As far as I know, Laravel 4 by default has the User model but no migration for the users table. It is easy enough to create your own migration for a users table. My user table contains username, password and email.