Penambahan kolom tabek
This commit is contained in:
@@ -109,6 +109,8 @@ class LetterController extends Controller
|
||||
'completion_date' => 'required|date',
|
||||
'nomor_surat_acceptance' => 'required|string',
|
||||
'nomor_surat_completion' => 'nullable|string',
|
||||
'address_to' => 'required|string',
|
||||
'letter_scope' => 'required|string',
|
||||
'lampiran' => 'nullable|file|mimes:pdf,jpg,png|max:2048',
|
||||
]);
|
||||
|
||||
@@ -205,6 +207,8 @@ class LetterController extends Controller
|
||||
'nomor_surat_acceptance' => 'nullable|string',
|
||||
'is_completion' => 'nullable|boolean',
|
||||
'nomor_surat_completion' => 'nullable|string',
|
||||
'address_to' => 'required|string',
|
||||
'letter_scope' => 'required|string',
|
||||
'lampiran' => 'nullable|file|mimes:pdf,jpg,png|max:2048',
|
||||
]);
|
||||
|
||||
@@ -356,6 +360,8 @@ class LetterController extends Controller
|
||||
'nomor_surat_acceptance' => $letter->nomor_surat_acceptance,
|
||||
'is_completion' => $letter->is_completion,
|
||||
'nomor_surat_completion' => $letter->nomor_surat_completion,
|
||||
'address_to' => $letter->address_to,
|
||||
'letter_scope' => $letter->letter_scope,
|
||||
'lampiran' => $letter->fileUpload ? $letter->fileUpload->id : null,
|
||||
'created_at' => $letter->created_at,
|
||||
];
|
||||
|
||||
@@ -27,6 +27,8 @@ class Letter extends Model
|
||||
'nomor_surat_acceptance',
|
||||
'is_completion',
|
||||
'nomor_surat_completion',
|
||||
'address_to',
|
||||
'letter_scope',
|
||||
];
|
||||
|
||||
protected static function boot()
|
||||
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('letters', function (Blueprint $table) {
|
||||
$table->string('address_to')->nullable();
|
||||
$table->string('letter_scope')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('letters', function (Blueprint $table) {
|
||||
$table->dropColumn(['address_to', 'letter_scope']);
|
||||
});
|
||||
}
|
||||
};
|
||||
BIN
Binary file not shown.
Reference in New Issue
Block a user