Skip to content

Commit c8e97b3

Browse files
committed
ITT: New publish_date field added for Post.
1 parent 881dd14 commit c8e97b3

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

tests/TestingTools/fixture/app/Post.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class Post extends Model
77
use Commentable;
88

99
protected $table = 'posts';
10-
protected $fillable = ['title'];
10+
protected $fillable = ['title', 'publish_date'];
1111

1212
public function comments()
1313
{

tests/TestingTools/fixture/database/factories/PostFactory.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
$factory->define(Post::class, function (Faker\Generator $faker) {
44
return [
55
'title' => $faker->sentence,
6+
'publish_date' => $faker->dateTimeThisYear,
67
];
78
});

tests/TestingTools/fixture/database/migrations/2016_11_01_131415_create_posts_table.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ public function up()
1111
Schema::create('posts', function (Blueprint $table) {
1212
$table->increments('id');
1313
$table->string('title');
14+
$table->dateTime('publish_date');
1415
$table->timestamps();
1516
});
1617
}

0 commit comments

Comments
 (0)