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/composer.lock b/composer.lock index 7b81a8f..6fa51d8 100644 --- a/composer.lock +++ b/composer.lock @@ -691,22 +691,22 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.5.1", + "version": "7.5.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "b964ca597e86b752cd994f27293e9fa6b6a95ed9" + "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b964ca597e86b752cd994f27293e9fa6b6a95ed9", - "reference": "b964ca597e86b752cd994f27293e9fa6b6a95ed9", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b50a2a1251152e43f6a37f0fa053e730a67d25ba", + "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba", "shasum": "" }, "require": { "ext-json": "*", "guzzlehttp/promises": "^1.5", - "guzzlehttp/psr7": "^1.9.1 || ^2.4.5", + "guzzlehttp/psr7": "^1.9 || ^2.4", "php": "^7.2.5 || ^8.0", "psr/http-client": "^1.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" @@ -799,7 +799,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.5.1" + "source": "https://github.com/guzzle/guzzle/tree/7.5.0" }, "funding": [ { @@ -815,7 +815,7 @@ "type": "tidelift" } ], - "time": "2023-04-17T16:30:08+00:00" + "time": "2022-08-28T15:39:27+00:00" }, { "name": "guzzlehttp/promises", @@ -903,22 +903,22 @@ }, { "name": "guzzlehttp/psr7", - "version": "2.5.0", + "version": "2.4.4", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "b635f279edd83fc275f822a1188157ffea568ff6" + "reference": "3cf1b6d4f0c820a2cf8bcaec39fc698f3443b5cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/b635f279edd83fc275f822a1188157ffea568ff6", - "reference": "b635f279edd83fc275f822a1188157ffea568ff6", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/3cf1b6d4f0c820a2cf8bcaec39fc698f3443b5cf", + "reference": "3cf1b6d4f0c820a2cf8bcaec39fc698f3443b5cf", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0", "psr/http-factory": "^1.0", - "psr/http-message": "^1.1 || ^2.0", + "psr/http-message": "^1.0", "ralouphie/getallheaders": "^3.0" }, "provide": { @@ -938,6 +938,9 @@ "bamarni-bin": { "bin-links": true, "forward-command": false + }, + "branch-alias": { + "dev-master": "2.4-dev" } }, "autoload": { @@ -999,7 +1002,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.5.0" + "source": "https://github.com/guzzle/psr7/tree/2.4.4" }, "funding": [ { @@ -1015,7 +1018,7 @@ "type": "tidelift" } ], - "time": "2023-04-17T16:11:26+00:00" + "time": "2023-03-09T13:19:02+00:00" }, { "name": "guzzlehttp/uri-template", @@ -7878,16 +7881,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "10.1.1", + "version": "10.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "884a0da7f9f46f28b2cb69134217fd810b793974" + "reference": "fc4f5ee614fa82d50ecf9014b51af0a9561f3df8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/884a0da7f9f46f28b2cb69134217fd810b793974", - "reference": "884a0da7f9f46f28b2cb69134217fd810b793974", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/fc4f5ee614fa82d50ecf9014b51af0a9561f3df8", + "reference": "fc4f5ee614fa82d50ecf9014b51af0a9561f3df8", "shasum": "" }, "require": { @@ -7906,7 +7909,7 @@ "theseer/tokenizer": "^1.2.0" }, "require-dev": { - "phpunit/phpunit": "^10.1" + "phpunit/phpunit": "^10.0" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -7944,7 +7947,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.1" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.0" }, "funding": [ { @@ -7952,7 +7955,7 @@ "type": "github" } ], - "time": "2023-04-17T12:15:40+00:00" + "time": "2023-04-13T07:08:27+00:00" }, { "name": "phpunit/php-file-iterator", @@ -8197,16 +8200,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.1.1", + "version": "10.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "0d9401b7e8245d71079e249e3cb868e9d2337887" + "reference": "5a477aea03e61329132935689ae2d73f418f5e25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0d9401b7e8245d71079e249e3cb868e9d2337887", - "reference": "0d9401b7e8245d71079e249e3cb868e9d2337887", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/5a477aea03e61329132935689ae2d73f418f5e25", + "reference": "5a477aea03e61329132935689ae2d73f418f5e25", "shasum": "" }, "require": { @@ -8220,7 +8223,7 @@ "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", "php": ">=8.1", - "phpunit/php-code-coverage": "^10.1.1", + "phpunit/php-code-coverage": "^10.1", "phpunit/php-file-iterator": "^4.0", "phpunit/php-invoker": "^4.0", "phpunit/php-text-template": "^3.0", @@ -8278,7 +8281,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.1.1" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.1.0" }, "funding": [ { @@ -8294,7 +8297,7 @@ "type": "tidelift" } ], - "time": "2023-04-17T12:17:05+00:00" + "time": "2023-04-14T05:15:09+00:00" }, { "name": "sebastian/cli-parser", 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 @@
- -
- -
- - - - -
- -