Add slug to BlogArticle

This commit is contained in:
Daniel_I_Am 2021-09-01 23:22:07 +02:00
parent 7d40c5d1cd
commit 847f13a15c
3 changed files with 3 additions and 0 deletions

View File

@ -11,6 +11,7 @@ class BlogArticle extends Model
protected $fillable = [ protected $fillable = [
'title', 'title',
'slug',
'date', 'date',
'summary', 'summary',
'content' 'content'

View File

@ -23,6 +23,7 @@ class BlogArticleFactory extends Factory
{ {
return [ return [
'title' => $this->faker->text(100), 'title' => $this->faker->text(100),
'slug' => $this->faker->slug(),
'date' => $this->faker->dateTimeBetween('100d'), 'date' => $this->faker->dateTimeBetween('100d'),
'summary' => $this->faker->text(200), 'summary' => $this->faker->text(200),
'content' => $this->faker->text(1000), 'content' => $this->faker->text(1000),

View File

@ -18,6 +18,7 @@ class CreateBlogArticlesTable extends Migration
$table->timestamps(); $table->timestamps();
$table->string('title'); $table->string('title');
$table->string('slug');
$table->dateTime('date'); $table->dateTime('date');
$table->string('summary'); $table->string('summary');
$table->text('content'); $table->text('content');