Skip to content

Commit c8c1dbd

Browse files
committed
readme foreign key addresses
1 parent 10f5fe9 commit c8c1dbd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Schema::create('persons', function (Blueprint $table) {
3333
$table->string('first_name', 100);
3434
$table->string('last_name', 100);
3535
$table->string('email');
36-
$table->foreignId('job_id')->constrained();
36+
$table->foreignId('address_id')->constrained();
3737
$table->text('bio')->nullable();
3838
$table->enum('gender', ['m', 'f', 'd']);
3939
$table->date('birth');
@@ -60,7 +60,7 @@ Copy & paste these to your controller validation or form request or where ever y
6060
'first_name' => ['required', 'string', 'min:1', 'max:100'],
6161
'last_name' => ['required', 'string', 'min:1', 'max:100'],
6262
'email' => ['required', 'string', 'min:1', 'max:255'],
63-
'job_id' => ['required', 'exists:jobs,id'],
63+
'address_id' => ['required', 'exists:addresss,id'],
6464
'bio' => ['nullable', 'string', 'min:1'],
6565
'gender' => ['required', 'string', 'in:m,f,d'],
6666
'birth' => ['required', 'date'],

0 commit comments

Comments
 (0)