Skip to content

Commit 040119c

Browse files
committed
Added weight fields to bills and comments
1 parent 8c02236 commit 040119c

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

tests/Bill.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class Bill extends Model
1111
*
1212
* @var array
1313
*/
14-
protected $fillable = ['amount'];
14+
protected $fillable = ['amount', 'weight'];
1515

1616
public function employee()
1717
{

tests/Comment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class Comment extends Model
1111
*
1212
* @var array
1313
*/
14-
protected $fillable = ['text'];
14+
protected $fillable = ['text', 'weight'];
1515

1616
public function commentable()
1717
{

tests/TestCase.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ protected function createTables()
129129
$table->increments('id');
130130
$table->decimal('amount', 5, 2);
131131
$table->integer('employee_id');
132+
$table->integer('weight')->default(0);
132133
$table->timestamps();
133134
});
134135

@@ -142,6 +143,7 @@ protected function createTables()
142143
$this->app['db']->connection()->getSchemaBuilder()->create('comments', function (Blueprint $table) {
143144
$table->increments('id');
144145
$table->string('text');
146+
$table->integer('weight')->default(0);
145147
$table->morphs('commentable');
146148
$table->timestamps();
147149
});

0 commit comments

Comments
 (0)