Zusammenfassung aller Datenbankfelder Felder für Posts.
create_posts_table
$table->id();
$table->foreignIdFor(User::class)->constrained()->restrictonDelete();
$table->string('title');
$table->longText('body');
$table->longText('html');
$table->timestamps();
PostFactory.php
'user_id' => User::factory(),
'title' => str(fake()->sentence)->beforeLast('.')->title(),
'body' => Collection::times(4, fn() => fake()->realText(1250))->join(PHP_EOL . PHP_EOL),
lang\post.php
'user_id' => 'Benutzer Id',
'title' => 'Titel',
'body' => 'Text',
Schreibe einen Kommentar