diff --git a/app/Database/migrations/2017_06_08_0000_create_users_table.php b/app/Database/migrations/2017_06_08_0000_create_users_table.php index c9da0653..94640c59 100755 --- a/app/Database/migrations/2017_06_08_0000_create_users_table.php +++ b/app/Database/migrations/2017_06_08_0000_create_users_table.php @@ -32,6 +32,7 @@ class CreateUsersTable extends Migration $table->string('timezone', 64)->nullable(); $table->unsignedTinyInteger('status')->nullable()->default(0); $table->unsignedTinyInteger('state')->nullable()->default(0); + $table->boolean('opt_in')->nullable(); $table->boolean('active')->nullable(); $table->ipAddress('last_ip')->nullable(); $table->rememberToken(); diff --git a/app/Models/User.php b/app/Models/User.php index 3c70bc23..6e4484f5 100755 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -26,6 +26,7 @@ use Laratrust\Traits\LaratrustUserTrait; * @property Journal journal * @property string pilot_id * @property int state + * @property bool opt_in * @mixin \Illuminate\Notifications\Notifiable * @mixin \Laratrust\Traits\LaratrustUserTrait */ @@ -60,6 +61,7 @@ class User extends Authenticatable 'timezone', 'state', 'status', + 'opt_in', 'created_at', 'updated_at', ]; @@ -80,6 +82,7 @@ class User extends Authenticatable 'balance' => 'double', 'state' => 'integer', 'status' => 'integer', + 'opt_in' => 'boolean', ]; public static $rules = [ @@ -122,7 +125,7 @@ class User extends Authenticatable { $this->attributes['timezone'] = $value; } - + /** * Return a File model */