| Conditions | 1 |
| Paths | 1 |
| Total Lines | 31 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function up() |
||
| 15 | { |
||
| 16 | Schema::create('admins', function($table) |
||
| 17 | { |
||
| 18 | $table->increments('id'); |
||
| 19 | $table->string('email'); |
||
| 20 | $table->string('password'); |
||
| 21 | $table->text('permissions')->nullable(); |
||
| 22 | $table->boolean('activated')->default(0); |
||
| 23 | $table->string('activation_code')->nullable(); |
||
| 24 | $table->timestamp('activated_at')->nullable(); |
||
| 25 | $table->timestamp('last_login')->nullable(); |
||
| 26 | $table->string('persist_code')->nullable(); |
||
| 27 | $table->string('reset_password_code')->nullable(); |
||
| 28 | $table->string('remember_token', 100)->nullable(); |
||
| 29 | $table->string('first_name')->nullable(); |
||
| 30 | $table->string('last_name')->nullable(); |
||
| 31 | $table->timestamps(); |
||
| 32 | // We'll need to ensure that MySQL uses the InnoDB engine to |
||
| 33 | // support the indexes, other engines aren't affected. |
||
| 34 | $table->engine = 'InnoDB'; |
||
| 35 | $table->unique('email'); |
||
| 36 | $table->index('activation_code'); |
||
| 37 | $table->index('reset_password_code'); |
||
| 38 | }); |
||
| 39 | Admin::create(array( |
||
| 40 | 'email' => '[email protected]', |
||
| 41 | 'password' => Hash::make('12345') |
||
| 42 | )); |
||
| 43 | |||
| 44 | } |
||
| 45 | |||
| 57 |