File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 {
Original file line number Diff line number Diff 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 {
Original file line number Diff line number Diff 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 });
You can’t perform that action at this time.
0 commit comments