diff --git a/app/Http/Controllers/DocumentController.php b/app/Http/Controllers/DocumentController.php index 706be79..15667ed 100644 --- a/app/Http/Controllers/DocumentController.php +++ b/app/Http/Controllers/DocumentController.php @@ -100,14 +100,6 @@ 'group' => $request->group, ]; - if($request->hasFile('file_upload')) { - $file = $request->file('file_upload'); - $filename = $file->getClientOriginalName(); - $file->move(public_path('uploads'), $filename); - $detail['file_name'] = $filename; - $detail['file_path'] = public_path('uploads'); - } - DocumentDetail::create($detail); } diff --git a/app/Models/DocumentDetail.php b/app/Models/DocumentDetail.php index 53a4bb7..e059e25 100644 --- a/app/Models/DocumentDetail.php +++ b/app/Models/DocumentDetail.php @@ -32,10 +32,7 @@ class DocumentDetail extends Model 'custom_field_1', 'custom_field_2', 'custom_field_3', - 'custom_field_4', - - 'file_name', - 'file_path', + 'custom_field_4' ]; diff --git a/database/migrations/2023_04_17_135930_create_document_details_table.php b/database/migrations/2023_04_17_135930_create_document_details_table.php index 59dc081..1f57db8 100644 --- a/database/migrations/2023_04_17_135930_create_document_details_table.php +++ b/database/migrations/2023_04_17_135930_create_document_details_table.php @@ -33,8 +33,6 @@ return new class extends Migration $table->string('custom_field_4')->nullable(); $table->string('status')->nullable(); $table->string('keterangan')->nullable(); - $table->string('file_name')->nullable(); - $table->string('file_path')->nullable(); $table->timestamps(); $table->softDeletes(); diff --git a/database/seeders/LabelSeeder.php b/database/seeders/LabelSeeder.php index ee2cc41..c4a5a3c 100644 --- a/database/seeders/LabelSeeder.php +++ b/database/seeders/LabelSeeder.php @@ -3,7 +3,6 @@ namespace Database\Seeders; use App\Models\Directorat; -use App\Models\DocumentType; use App\Models\Job; use App\Models\SpecialCode; use App\Models\SubDirectorat; @@ -65,10 +64,5 @@ class LabelSeeder extends Seeder 'kode' => '98', 'name' => 'Softcopy' ]); - - $documentType = DocumentType::create([ - 'kode' => '01', - 'name' => 'Surat Masuk', - ]); } } diff --git a/public/uploads/Transaction Report.pdf b/public/uploads/Transaction Report.pdf deleted file mode 100644 index c7e61fc..0000000 Binary files a/public/uploads/Transaction Report.pdf and /dev/null differ diff --git a/resources/views/pages/app/document/_form.blade.php b/resources/views/pages/app/document/_form.blade.php index 4a4d97c..89e4781 100644 --- a/resources/views/pages/app/document/_form.blade.php +++ b/resources/views/pages/app/document/_form.blade.php @@ -2,7 +2,7 @@ $route = explode('.', Route::currentRouteName()); @endphp -
+ @csrf
@@ -349,20 +349,6 @@
- -
- -
- - - - -
- -