Add slug to BlogArticle
This commit is contained in:
parent
7d40c5d1cd
commit
847f13a15c
@ -11,6 +11,7 @@ class BlogArticle extends Model
|
|||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'title',
|
'title',
|
||||||
|
'slug',
|
||||||
'date',
|
'date',
|
||||||
'summary',
|
'summary',
|
||||||
'content'
|
'content'
|
||||||
|
|||||||
@ -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),
|
||||||
|
|||||||
@ -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');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user