From ec31812ccee4f62bf91dee410c3a9e8d8182b24d Mon Sep 17 00:00:00 2001 From: Shift Date: Mon, 12 Feb 2024 23:17:33 +0000 Subject: [PATCH 01/21] Adopt short array syntax Since PHP 5.4 the short array syntax `[]` may be used instead of `array()`. --- ...92516_modify_pengaturan_aplikasi_table.php | 4 +-- ...ify_pengaturan_aplikasi_tanggal_backup.php | 4 +-- database/seeders/SanctumAksesTokenSeeder.php | 8 ++--- database/seeders/UserSeeder.php | 32 +++++++++---------- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/database/migrations/2023_11_04_192516_modify_pengaturan_aplikasi_table.php b/database/migrations/2023_11_04_192516_modify_pengaturan_aplikasi_table.php index af5ce391..75303298 100644 --- a/database/migrations/2023_11_04_192516_modify_pengaturan_aplikasi_table.php +++ b/database/migrations/2023_11_04_192516_modify_pengaturan_aplikasi_table.php @@ -12,7 +12,7 @@ class ModifyPengaturanAplikasiTable extends Migration */ public function up() { - $pengaturan_aplikasi = array( + $pengaturan_aplikasi = [ [ 'id' => 5, 'judul' => 'Cloud Storage', @@ -43,7 +43,7 @@ public function up() 'option' => '', 'kategori' => 'setting' ] - ); + ]; foreach($pengaturan_aplikasi as $item){ PengaturanAplikasi::create($item); diff --git a/database/migrations/2023_11_10_210253_modify_pengaturan_aplikasi_tanggal_backup.php b/database/migrations/2023_11_10_210253_modify_pengaturan_aplikasi_tanggal_backup.php index 6cf28b63..6a3ffe3e 100644 --- a/database/migrations/2023_11_10_210253_modify_pengaturan_aplikasi_tanggal_backup.php +++ b/database/migrations/2023_11_10_210253_modify_pengaturan_aplikasi_tanggal_backup.php @@ -12,7 +12,7 @@ class ModifyPengaturanAplikasiTanggalBackup extends Migration */ public function up() { - $pengaturan_aplikasi = array( + $pengaturan_aplikasi = [ [ 'id' => 8, 'judul' => 'Akhir Backup', @@ -23,7 +23,7 @@ public function up() 'option' => '', 'kategori' => 'setting' ], - ); + ]; foreach($pengaturan_aplikasi as $item){ PengaturanAplikasi::create($item); diff --git a/database/seeders/SanctumAksesTokenSeeder.php b/database/seeders/SanctumAksesTokenSeeder.php index ec777a5b..63850315 100644 --- a/database/seeders/SanctumAksesTokenSeeder.php +++ b/database/seeders/SanctumAksesTokenSeeder.php @@ -14,8 +14,8 @@ class SanctumAksesTokenSeeder extends Seeder */ public function run() { - $personal_access_tokens = array( - array( + $personal_access_tokens = [ + [ "id" => 1, "tokenable_type" => "App\\Models\\User", "tokenable_id" => 6, @@ -25,8 +25,8 @@ public function run() "last_used_at" => "2021-12-24 03:20:06", "created_at" => "2021-12-24 03:13:52", "updated_at" => "2021-12-24 03:20:06", - ), - ); + ], + ]; foreach ($personal_access_tokens as $token) { // Use updateOrInsert to insert or update the token diff --git a/database/seeders/UserSeeder.php b/database/seeders/UserSeeder.php index 9db19f73..8c6aa90c 100644 --- a/database/seeders/UserSeeder.php +++ b/database/seeders/UserSeeder.php @@ -14,8 +14,8 @@ class UserSeeder extends Seeder */ public function run() { - $users = array( - array( + $users = [ + [ "id_grup" => 1, "name" => "Eddie Ridwan", "username" => "eddieridwan", @@ -24,8 +24,8 @@ public function run() "password" => '$2y$10$xyNmjtuWL3.apmIgQGZ2y.c8X908ym8PlbkZQPCB4iJoVHq90Fv8q', "token" => null, "created_at" => now(), - ), - array( + ], + [ "id_grup" => 1, "name" => "Herry Wanda", "username" => "herrywanda", @@ -34,8 +34,8 @@ public function run() "password" => '$2y$10$b6IFYRt9th6nr1S2dfbb4epFIFpy.QcXbN.iB7SzMJuFO4BjePdq6', "token" => null, "created_at" => now(), - ), - array( + ], + [ "id_grup" => 1, "name" => "Rudi Purwanto", "username" => "roaddee", @@ -44,8 +44,8 @@ public function run() "password" => '$2y$10$V7iREjPiUnjvVkIOp9iPIeV72wb/k0z4NBXwT9raUT4XpvVYnWvOa', "token" => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6bnVsbCwidGltZXN0YW1wIjoxNjE0MjM5ODQzfQ.HlzpyJgG431dw17idGuU70b1FJXW7ZrmRZRzsC9jyIU', "created_at" => now(), - ), - array( + ], + [ "id_grup" => 1, "name" => "Muhammad Ihsan", "username" => "muhammadihsan", @@ -54,8 +54,8 @@ public function run() "password" => "$2y$10$1Nikfgo/0yYjQGVDb1vGhegoXyFTiqYfCaTx4Xc8RlB4zcK6kSPie", "token" => null, "created_at" => now(), - ), - array( + ], + [ "id_grup" => 1, "name" => "Muhammad AI", "username" => "aiskematik", @@ -64,8 +64,8 @@ public function run() "password" => "$2y$10$/TyNRWV5NJN4zekzIaEMbO/mzwc9HunTmNoUAnaKl9x1AMbd3/4vW", "token" => null, "created_at" => now(), - ), - array( + ], + [ "id_grup" => 1, "name" => "Agung Sugiarto", "username" => "agungsugiarto", @@ -74,8 +74,8 @@ public function run() "password" => '$2y$10$u9P4w37ps8jS1mwFdgsWuOYdRha2UYTRyhLaKCUpqj3I4dl9PY4IW', "token" => null, "created_at" => now(), - ), - array( + ], + [ "id_grup" => 1, "name" => "Andi Fahruddin Akas", "username" => "andifahruddinakas", @@ -84,8 +84,8 @@ public function run() "password" => '$2y$10$frHX2pWN3XQiZeljnpDtnOkMqWpTnajYVjFeKNR9K04oxlkyqpf9u', "token" => null, "created_at" => now(), - ), - ); + ], + ]; DB::table('users')->insert($users); } From 961a5a74a65ab0edbaa2c80fdde9c0cfcde86b06 Mon Sep 17 00:00:00 2001 From: Shift Date: Mon, 12 Feb 2024 23:17:34 +0000 Subject: [PATCH 02/21] Convert string references to `::class` PHP 5.5.9 adds the new static `class` property which provides the fully qualified class name. This is preferred over using strings for class names since the `class` property references are checked by PHP. --- database/seeders/SanctumAksesTokenSeeder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/seeders/SanctumAksesTokenSeeder.php b/database/seeders/SanctumAksesTokenSeeder.php index 63850315..bcab2246 100644 --- a/database/seeders/SanctumAksesTokenSeeder.php +++ b/database/seeders/SanctumAksesTokenSeeder.php @@ -17,7 +17,7 @@ public function run() $personal_access_tokens = [ [ "id" => 1, - "tokenable_type" => "App\\Models\\User", + "tokenable_type" => \App\Models\User::class, "tokenable_id" => 6, "name" => "pantau-sid", "token" => "009652573bc23cec5e761bce432722c472936376432065703d1fa5f2aea26201", From d3064726e01cab5c2332fdcdf8f50ef457e31d62 Mon Sep 17 00:00:00 2001 From: Shift Date: Mon, 12 Feb 2024 23:17:36 +0000 Subject: [PATCH 03/21] Move `resources/lang` folder --- {resources/lang => lang}/en/auth.php | 0 {resources/lang => lang}/en/pagination.php | 0 {resources/lang => lang}/en/passwords.php | 0 {resources/lang => lang}/en/validation.php | 0 {resources/lang => lang}/id/auth.php | 0 {resources/lang => lang}/id/pagination.php | 0 {resources/lang => lang}/id/passwords.php | 0 {resources/lang => lang}/id/validation-inline.php | 0 {resources/lang => lang}/id/validation.php | 0 {resources/lang => lang}/vendor/adminlte/ar/adminlte.php | 0 {resources/lang => lang}/vendor/adminlte/ca/adminlte.php | 0 {resources/lang => lang}/vendor/adminlte/de/adminlte.php | 0 {resources/lang => lang}/vendor/adminlte/de/menu.php | 0 {resources/lang => lang}/vendor/adminlte/en/adminlte.php | 0 {resources/lang => lang}/vendor/adminlte/en/iframe.php | 0 {resources/lang => lang}/vendor/adminlte/en/menu.php | 0 {resources/lang => lang}/vendor/adminlte/es/adminlte.php | 0 {resources/lang => lang}/vendor/adminlte/es/iframe.php | 0 {resources/lang => lang}/vendor/adminlte/es/menu.php | 0 {resources/lang => lang}/vendor/adminlte/fa/adminlte.php | 0 {resources/lang => lang}/vendor/adminlte/fr/adminlte.php | 0 {resources/lang => lang}/vendor/adminlte/hr/adminlte.php | 0 {resources/lang => lang}/vendor/adminlte/hu/adminlte.php | 0 {resources/lang => lang}/vendor/adminlte/id/adminlte.php | 0 {resources/lang => lang}/vendor/adminlte/id/menu.php | 0 {resources/lang => lang}/vendor/adminlte/it/adminlte.php | 0 {resources/lang => lang}/vendor/adminlte/ja/adminlte.php | 0 {resources/lang => lang}/vendor/adminlte/ja/menu.php | 0 {resources/lang => lang}/vendor/adminlte/la/adminlte.php | 0 {resources/lang => lang}/vendor/adminlte/la/menu.php | 0 {resources/lang => lang}/vendor/adminlte/nl/adminlte.php | 0 {resources/lang => lang}/vendor/adminlte/pl/adminlte.php | 0 {resources/lang => lang}/vendor/adminlte/pl/menu.php | 0 {resources/lang => lang}/vendor/adminlte/pt-br/adminlte.php | 0 {resources/lang => lang}/vendor/adminlte/pt-br/menu.php | 0 {resources/lang => lang}/vendor/adminlte/ru/adminlte.php | 0 {resources/lang => lang}/vendor/adminlte/ru/menu.php | 0 {resources/lang => lang}/vendor/adminlte/sr/adminlte.php | 0 {resources/lang => lang}/vendor/adminlte/sr/menu.php | 0 {resources/lang => lang}/vendor/adminlte/tr/adminlte.php | 0 {resources/lang => lang}/vendor/adminlte/tr/menu.php | 0 {resources/lang => lang}/vendor/adminlte/uk/adminlte.php | 0 {resources/lang => lang}/vendor/adminlte/uk/menu.php | 0 {resources/lang => lang}/vendor/adminlte/vi/adminlte.php | 0 {resources/lang => lang}/vendor/adminlte/vi/menu.php | 0 {resources/lang => lang}/vendor/adminlte/zh-CN/adminlte.php | 0 {resources/lang => lang}/vendor/adminlte/zh-CN/menu.php | 0 {resources/lang => lang}/vendor/backup/en/notifications.php | 0 {resources/lang => lang}/vendor/backup/id/notifications.php | 0 49 files changed, 0 insertions(+), 0 deletions(-) rename {resources/lang => lang}/en/auth.php (100%) rename {resources/lang => lang}/en/pagination.php (100%) rename {resources/lang => lang}/en/passwords.php (100%) rename {resources/lang => lang}/en/validation.php (100%) rename {resources/lang => lang}/id/auth.php (100%) rename {resources/lang => lang}/id/pagination.php (100%) rename {resources/lang => lang}/id/passwords.php (100%) rename {resources/lang => lang}/id/validation-inline.php (100%) rename {resources/lang => lang}/id/validation.php (100%) rename {resources/lang => lang}/vendor/adminlte/ar/adminlte.php (100%) rename {resources/lang => lang}/vendor/adminlte/ca/adminlte.php (100%) rename {resources/lang => lang}/vendor/adminlte/de/adminlte.php (100%) rename {resources/lang => lang}/vendor/adminlte/de/menu.php (100%) rename {resources/lang => lang}/vendor/adminlte/en/adminlte.php (100%) rename {resources/lang => lang}/vendor/adminlte/en/iframe.php (100%) rename {resources/lang => lang}/vendor/adminlte/en/menu.php (100%) rename {resources/lang => lang}/vendor/adminlte/es/adminlte.php (100%) rename {resources/lang => lang}/vendor/adminlte/es/iframe.php (100%) rename {resources/lang => lang}/vendor/adminlte/es/menu.php (100%) rename {resources/lang => lang}/vendor/adminlte/fa/adminlte.php (100%) rename {resources/lang => lang}/vendor/adminlte/fr/adminlte.php (100%) rename {resources/lang => lang}/vendor/adminlte/hr/adminlte.php (100%) rename {resources/lang => lang}/vendor/adminlte/hu/adminlte.php (100%) rename {resources/lang => lang}/vendor/adminlte/id/adminlte.php (100%) rename {resources/lang => lang}/vendor/adminlte/id/menu.php (100%) rename {resources/lang => lang}/vendor/adminlte/it/adminlte.php (100%) rename {resources/lang => lang}/vendor/adminlte/ja/adminlte.php (100%) rename {resources/lang => lang}/vendor/adminlte/ja/menu.php (100%) rename {resources/lang => lang}/vendor/adminlte/la/adminlte.php (100%) rename {resources/lang => lang}/vendor/adminlte/la/menu.php (100%) rename {resources/lang => lang}/vendor/adminlte/nl/adminlte.php (100%) rename {resources/lang => lang}/vendor/adminlte/pl/adminlte.php (100%) rename {resources/lang => lang}/vendor/adminlte/pl/menu.php (100%) rename {resources/lang => lang}/vendor/adminlte/pt-br/adminlte.php (100%) rename {resources/lang => lang}/vendor/adminlte/pt-br/menu.php (100%) rename {resources/lang => lang}/vendor/adminlte/ru/adminlte.php (100%) rename {resources/lang => lang}/vendor/adminlte/ru/menu.php (100%) rename {resources/lang => lang}/vendor/adminlte/sr/adminlte.php (100%) rename {resources/lang => lang}/vendor/adminlte/sr/menu.php (100%) rename {resources/lang => lang}/vendor/adminlte/tr/adminlte.php (100%) rename {resources/lang => lang}/vendor/adminlte/tr/menu.php (100%) rename {resources/lang => lang}/vendor/adminlte/uk/adminlte.php (100%) rename {resources/lang => lang}/vendor/adminlte/uk/menu.php (100%) rename {resources/lang => lang}/vendor/adminlte/vi/adminlte.php (100%) rename {resources/lang => lang}/vendor/adminlte/vi/menu.php (100%) rename {resources/lang => lang}/vendor/adminlte/zh-CN/adminlte.php (100%) rename {resources/lang => lang}/vendor/adminlte/zh-CN/menu.php (100%) rename {resources/lang => lang}/vendor/backup/en/notifications.php (100%) rename {resources/lang => lang}/vendor/backup/id/notifications.php (100%) diff --git a/resources/lang/en/auth.php b/lang/en/auth.php similarity index 100% rename from resources/lang/en/auth.php rename to lang/en/auth.php diff --git a/resources/lang/en/pagination.php b/lang/en/pagination.php similarity index 100% rename from resources/lang/en/pagination.php rename to lang/en/pagination.php diff --git a/resources/lang/en/passwords.php b/lang/en/passwords.php similarity index 100% rename from resources/lang/en/passwords.php rename to lang/en/passwords.php diff --git a/resources/lang/en/validation.php b/lang/en/validation.php similarity index 100% rename from resources/lang/en/validation.php rename to lang/en/validation.php diff --git a/resources/lang/id/auth.php b/lang/id/auth.php similarity index 100% rename from resources/lang/id/auth.php rename to lang/id/auth.php diff --git a/resources/lang/id/pagination.php b/lang/id/pagination.php similarity index 100% rename from resources/lang/id/pagination.php rename to lang/id/pagination.php diff --git a/resources/lang/id/passwords.php b/lang/id/passwords.php similarity index 100% rename from resources/lang/id/passwords.php rename to lang/id/passwords.php diff --git a/resources/lang/id/validation-inline.php b/lang/id/validation-inline.php similarity index 100% rename from resources/lang/id/validation-inline.php rename to lang/id/validation-inline.php diff --git a/resources/lang/id/validation.php b/lang/id/validation.php similarity index 100% rename from resources/lang/id/validation.php rename to lang/id/validation.php diff --git a/resources/lang/vendor/adminlte/ar/adminlte.php b/lang/vendor/adminlte/ar/adminlte.php similarity index 100% rename from resources/lang/vendor/adminlte/ar/adminlte.php rename to lang/vendor/adminlte/ar/adminlte.php diff --git a/resources/lang/vendor/adminlte/ca/adminlte.php b/lang/vendor/adminlte/ca/adminlte.php similarity index 100% rename from resources/lang/vendor/adminlte/ca/adminlte.php rename to lang/vendor/adminlte/ca/adminlte.php diff --git a/resources/lang/vendor/adminlte/de/adminlte.php b/lang/vendor/adminlte/de/adminlte.php similarity index 100% rename from resources/lang/vendor/adminlte/de/adminlte.php rename to lang/vendor/adminlte/de/adminlte.php diff --git a/resources/lang/vendor/adminlte/de/menu.php b/lang/vendor/adminlte/de/menu.php similarity index 100% rename from resources/lang/vendor/adminlte/de/menu.php rename to lang/vendor/adminlte/de/menu.php diff --git a/resources/lang/vendor/adminlte/en/adminlte.php b/lang/vendor/adminlte/en/adminlte.php similarity index 100% rename from resources/lang/vendor/adminlte/en/adminlte.php rename to lang/vendor/adminlte/en/adminlte.php diff --git a/resources/lang/vendor/adminlte/en/iframe.php b/lang/vendor/adminlte/en/iframe.php similarity index 100% rename from resources/lang/vendor/adminlte/en/iframe.php rename to lang/vendor/adminlte/en/iframe.php diff --git a/resources/lang/vendor/adminlte/en/menu.php b/lang/vendor/adminlte/en/menu.php similarity index 100% rename from resources/lang/vendor/adminlte/en/menu.php rename to lang/vendor/adminlte/en/menu.php diff --git a/resources/lang/vendor/adminlte/es/adminlte.php b/lang/vendor/adminlte/es/adminlte.php similarity index 100% rename from resources/lang/vendor/adminlte/es/adminlte.php rename to lang/vendor/adminlte/es/adminlte.php diff --git a/resources/lang/vendor/adminlte/es/iframe.php b/lang/vendor/adminlte/es/iframe.php similarity index 100% rename from resources/lang/vendor/adminlte/es/iframe.php rename to lang/vendor/adminlte/es/iframe.php diff --git a/resources/lang/vendor/adminlte/es/menu.php b/lang/vendor/adminlte/es/menu.php similarity index 100% rename from resources/lang/vendor/adminlte/es/menu.php rename to lang/vendor/adminlte/es/menu.php diff --git a/resources/lang/vendor/adminlte/fa/adminlte.php b/lang/vendor/adminlte/fa/adminlte.php similarity index 100% rename from resources/lang/vendor/adminlte/fa/adminlte.php rename to lang/vendor/adminlte/fa/adminlte.php diff --git a/resources/lang/vendor/adminlte/fr/adminlte.php b/lang/vendor/adminlte/fr/adminlte.php similarity index 100% rename from resources/lang/vendor/adminlte/fr/adminlte.php rename to lang/vendor/adminlte/fr/adminlte.php diff --git a/resources/lang/vendor/adminlte/hr/adminlte.php b/lang/vendor/adminlte/hr/adminlte.php similarity index 100% rename from resources/lang/vendor/adminlte/hr/adminlte.php rename to lang/vendor/adminlte/hr/adminlte.php diff --git a/resources/lang/vendor/adminlte/hu/adminlte.php b/lang/vendor/adminlte/hu/adminlte.php similarity index 100% rename from resources/lang/vendor/adminlte/hu/adminlte.php rename to lang/vendor/adminlte/hu/adminlte.php diff --git a/resources/lang/vendor/adminlte/id/adminlte.php b/lang/vendor/adminlte/id/adminlte.php similarity index 100% rename from resources/lang/vendor/adminlte/id/adminlte.php rename to lang/vendor/adminlte/id/adminlte.php diff --git a/resources/lang/vendor/adminlte/id/menu.php b/lang/vendor/adminlte/id/menu.php similarity index 100% rename from resources/lang/vendor/adminlte/id/menu.php rename to lang/vendor/adminlte/id/menu.php diff --git a/resources/lang/vendor/adminlte/it/adminlte.php b/lang/vendor/adminlte/it/adminlte.php similarity index 100% rename from resources/lang/vendor/adminlte/it/adminlte.php rename to lang/vendor/adminlte/it/adminlte.php diff --git a/resources/lang/vendor/adminlte/ja/adminlte.php b/lang/vendor/adminlte/ja/adminlte.php similarity index 100% rename from resources/lang/vendor/adminlte/ja/adminlte.php rename to lang/vendor/adminlte/ja/adminlte.php diff --git a/resources/lang/vendor/adminlte/ja/menu.php b/lang/vendor/adminlte/ja/menu.php similarity index 100% rename from resources/lang/vendor/adminlte/ja/menu.php rename to lang/vendor/adminlte/ja/menu.php diff --git a/resources/lang/vendor/adminlte/la/adminlte.php b/lang/vendor/adminlte/la/adminlte.php similarity index 100% rename from resources/lang/vendor/adminlte/la/adminlte.php rename to lang/vendor/adminlte/la/adminlte.php diff --git a/resources/lang/vendor/adminlte/la/menu.php b/lang/vendor/adminlte/la/menu.php similarity index 100% rename from resources/lang/vendor/adminlte/la/menu.php rename to lang/vendor/adminlte/la/menu.php diff --git a/resources/lang/vendor/adminlte/nl/adminlte.php b/lang/vendor/adminlte/nl/adminlte.php similarity index 100% rename from resources/lang/vendor/adminlte/nl/adminlte.php rename to lang/vendor/adminlte/nl/adminlte.php diff --git a/resources/lang/vendor/adminlte/pl/adminlte.php b/lang/vendor/adminlte/pl/adminlte.php similarity index 100% rename from resources/lang/vendor/adminlte/pl/adminlte.php rename to lang/vendor/adminlte/pl/adminlte.php diff --git a/resources/lang/vendor/adminlte/pl/menu.php b/lang/vendor/adminlte/pl/menu.php similarity index 100% rename from resources/lang/vendor/adminlte/pl/menu.php rename to lang/vendor/adminlte/pl/menu.php diff --git a/resources/lang/vendor/adminlte/pt-br/adminlte.php b/lang/vendor/adminlte/pt-br/adminlte.php similarity index 100% rename from resources/lang/vendor/adminlte/pt-br/adminlte.php rename to lang/vendor/adminlte/pt-br/adminlte.php diff --git a/resources/lang/vendor/adminlte/pt-br/menu.php b/lang/vendor/adminlte/pt-br/menu.php similarity index 100% rename from resources/lang/vendor/adminlte/pt-br/menu.php rename to lang/vendor/adminlte/pt-br/menu.php diff --git a/resources/lang/vendor/adminlte/ru/adminlte.php b/lang/vendor/adminlte/ru/adminlte.php similarity index 100% rename from resources/lang/vendor/adminlte/ru/adminlte.php rename to lang/vendor/adminlte/ru/adminlte.php diff --git a/resources/lang/vendor/adminlte/ru/menu.php b/lang/vendor/adminlte/ru/menu.php similarity index 100% rename from resources/lang/vendor/adminlte/ru/menu.php rename to lang/vendor/adminlte/ru/menu.php diff --git a/resources/lang/vendor/adminlte/sr/adminlte.php b/lang/vendor/adminlte/sr/adminlte.php similarity index 100% rename from resources/lang/vendor/adminlte/sr/adminlte.php rename to lang/vendor/adminlte/sr/adminlte.php diff --git a/resources/lang/vendor/adminlte/sr/menu.php b/lang/vendor/adminlte/sr/menu.php similarity index 100% rename from resources/lang/vendor/adminlte/sr/menu.php rename to lang/vendor/adminlte/sr/menu.php diff --git a/resources/lang/vendor/adminlte/tr/adminlte.php b/lang/vendor/adminlte/tr/adminlte.php similarity index 100% rename from resources/lang/vendor/adminlte/tr/adminlte.php rename to lang/vendor/adminlte/tr/adminlte.php diff --git a/resources/lang/vendor/adminlte/tr/menu.php b/lang/vendor/adminlte/tr/menu.php similarity index 100% rename from resources/lang/vendor/adminlte/tr/menu.php rename to lang/vendor/adminlte/tr/menu.php diff --git a/resources/lang/vendor/adminlte/uk/adminlte.php b/lang/vendor/adminlte/uk/adminlte.php similarity index 100% rename from resources/lang/vendor/adminlte/uk/adminlte.php rename to lang/vendor/adminlte/uk/adminlte.php diff --git a/resources/lang/vendor/adminlte/uk/menu.php b/lang/vendor/adminlte/uk/menu.php similarity index 100% rename from resources/lang/vendor/adminlte/uk/menu.php rename to lang/vendor/adminlte/uk/menu.php diff --git a/resources/lang/vendor/adminlte/vi/adminlte.php b/lang/vendor/adminlte/vi/adminlte.php similarity index 100% rename from resources/lang/vendor/adminlte/vi/adminlte.php rename to lang/vendor/adminlte/vi/adminlte.php diff --git a/resources/lang/vendor/adminlte/vi/menu.php b/lang/vendor/adminlte/vi/menu.php similarity index 100% rename from resources/lang/vendor/adminlte/vi/menu.php rename to lang/vendor/adminlte/vi/menu.php diff --git a/resources/lang/vendor/adminlte/zh-CN/adminlte.php b/lang/vendor/adminlte/zh-CN/adminlte.php similarity index 100% rename from resources/lang/vendor/adminlte/zh-CN/adminlte.php rename to lang/vendor/adminlte/zh-CN/adminlte.php diff --git a/resources/lang/vendor/adminlte/zh-CN/menu.php b/lang/vendor/adminlte/zh-CN/menu.php similarity index 100% rename from resources/lang/vendor/adminlte/zh-CN/menu.php rename to lang/vendor/adminlte/zh-CN/menu.php diff --git a/resources/lang/vendor/backup/en/notifications.php b/lang/vendor/backup/en/notifications.php similarity index 100% rename from resources/lang/vendor/backup/en/notifications.php rename to lang/vendor/backup/en/notifications.php diff --git a/resources/lang/vendor/backup/id/notifications.php b/lang/vendor/backup/id/notifications.php similarity index 100% rename from resources/lang/vendor/backup/id/notifications.php rename to lang/vendor/backup/id/notifications.php From 0441e035814aed01cf81b49a5a1f704828d28e80 Mon Sep 17 00:00:00 2001 From: Shift Date: Mon, 12 Feb 2024 23:17:38 +0000 Subject: [PATCH 04/21] Shift registered middleware --- app/Http/Kernel.php | 1 - app/Http/Middleware/ValidateSignature.php | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 app/Http/Middleware/ValidateSignature.php diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 05728150..fdb4dd44 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -33,7 +33,6 @@ class Kernel extends HttpKernel \App\Http\Middleware\EncryptCookies::class, \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, \Illuminate\Session\Middleware\StartSession::class, - // \Illuminate\Session\Middleware\AuthenticateSession::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class, \App\Http\Middleware\VerifyCsrfToken::class, \Illuminate\Routing\Middleware\SubstituteBindings::class, diff --git a/app/Http/Middleware/ValidateSignature.php b/app/Http/Middleware/ValidateSignature.php new file mode 100644 index 00000000..093bf64a --- /dev/null +++ b/app/Http/Middleware/ValidateSignature.php @@ -0,0 +1,22 @@ + + */ + protected $except = [ + // 'fbclid', + // 'utm_campaign', + // 'utm_content', + // 'utm_medium', + // 'utm_source', + // 'utm_term', + ]; +} From 946baa3cda9cbf687b09c3300fdde6f82637c535 Mon Sep 17 00:00:00 2001 From: Shift Date: Mon, 12 Feb 2024 23:17:38 +0000 Subject: [PATCH 05/21] Remove `fruitcake/laravel-cors` dependency --- app/Http/Kernel.php | 2 +- composer.json | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index fdb4dd44..3b0325b3 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -16,7 +16,7 @@ class Kernel extends HttpKernel protected $middleware = [ // \App\Http\Middleware\TrustHosts::class, \App\Http\Middleware\TrustProxies::class, - \Fruitcake\Cors\HandleCors::class, + \Illuminate\Http\Middleware\HandleCors::class, \App\Http\Middleware\PreventRequestsDuringMaintenance::class, \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, \App\Http\Middleware\TrimStrings::class, diff --git a/composer.json b/composer.json index 27a30ebe..edb659aa 100644 --- a/composer.json +++ b/composer.json @@ -2,12 +2,14 @@ "name": "laravel/laravel", "type": "project", "description": "The Laravel Framework.", - "keywords": ["framework", "laravel"], + "keywords": [ + "framework", + "laravel" + ], "license": "MIT", "require": { "php": "^7.3|^8.0", "doctrine/dbal": "^3.6", - "fruitcake/laravel-cors": "^2.0", "guzzlehttp/guzzle": "^7.0.1", "jeroennoten/laravel-adminlte": "^3.7", "laravel/framework": "^8.65", From d25de499d721b11c26c1f50c3c742767776bfc92 Mon Sep 17 00:00:00 2001 From: Shift Date: Mon, 12 Feb 2024 23:17:38 +0000 Subject: [PATCH 06/21] Upgrade to Flysystem 3.0 --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index edb659aa..ffa8d2fc 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,8 @@ "spatie/db-dumper": "^2.21", "spatie/laravel-backup": "^6.16", "yajra/laravel-datatables-oracle": "^9.18", - "laravel/helpers": "^1.3" + "laravel/helpers": "^1.3", + "league/flysystem-aws-s3-v3": "^3.0" }, "require-dev": { "barryvdh/laravel-debugbar": "^3.6", From 513e13ad42d299319503cc6792df4ff720d0b0f7 Mon Sep 17 00:00:00 2001 From: Shift Date: Mon, 12 Feb 2024 23:17:40 +0000 Subject: [PATCH 07/21] Shift core files --- app/Exceptions/Handler.php | 13 ++++++- app/Providers/EventServiceProvider.php | 11 ++++++ database/factories/UserFactory.php | 19 ++++----- lang/en/validation.php | 53 +++++++++++++++++--------- public/index.php | 4 +- server.php | 21 ---------- 6 files changed, 70 insertions(+), 51 deletions(-) delete mode 100644 server.php diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 8e7fbd1b..82a37e40 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -7,17 +7,26 @@ class Handler extends ExceptionHandler { + /** + * A list of exception types with their corresponding custom log levels. + * + * @var array, \Psr\Log\LogLevel::*> + */ + protected $levels = [ + // + ]; + /** * A list of the exception types that are not reported. * - * @var array> + * @var array> */ protected $dontReport = [ // ]; /** - * A list of the inputs that are never flashed for validation exceptions. + * A list of the inputs that are never flashed to the session on validation exceptions. * * @var array */ diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index 21a298db..106b8d91 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -72,4 +72,15 @@ public function boot() } }); } + + /** + * Determine if events and listeners should be automatically discovered. + * + * @return bool + */ + public function shouldDiscoverEvents() + { + return false; + } } + diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index a3eb239a..41f8ae89 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -5,18 +5,21 @@ use Illuminate\Database\Eloquent\Factories\Factory; use Illuminate\Support\Str; +/** + * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User> + */ class UserFactory extends Factory { /** * Define the model's default state. * - * @return array + * @return array */ public function definition() { return [ - 'name' => $this->faker->name(), - 'email' => $this->faker->unique()->safeEmail(), + 'name' => fake()->name(), + 'email' => fake()->unique()->safeEmail(), 'email_verified_at' => now(), 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 'remember_token' => Str::random(10), @@ -26,14 +29,12 @@ public function definition() /** * Indicate that the model's email address should be unverified. * - * @return \Illuminate\Database\Eloquent\Factories\Factory + * @return static */ public function unverified() { - return $this->state(function (array $attributes) { - return [ - 'email_verified_at' => null, - ]; - }); + return $this->state(fn (array $attributes) => [ + 'email_verified_at' => null, + ]); } } diff --git a/lang/en/validation.php b/lang/en/validation.php index ba42c8d9..af94bd42 100644 --- a/lang/en/validation.php +++ b/lang/en/validation.php @@ -22,13 +22,14 @@ 'alpha_dash' => 'The :attribute must only contain letters, numbers, dashes and underscores.', 'alpha_num' => 'The :attribute must only contain letters and numbers.', 'array' => 'The :attribute must be an array.', + 'ascii' => 'The :attribute must only contain single-byte alphanumeric characters and symbols.', 'before' => 'The :attribute must be a date before :date.', 'before_or_equal' => 'The :attribute must be a date before or equal to :date.', 'between' => [ - 'numeric' => 'The :attribute must be between :min and :max.', + 'array' => 'The :attribute must have between :min and :max items.', 'file' => 'The :attribute must be between :min and :max kilobytes.', + 'numeric' => 'The :attribute must be between :min and :max.', 'string' => 'The :attribute must be between :min and :max characters.', - 'array' => 'The :attribute must have between :min and :max items.', ], 'boolean' => 'The :attribute field must be true or false.', 'confirmed' => 'The :attribute confirmation does not match.', @@ -36,6 +37,7 @@ 'date' => 'The :attribute is not a valid date.', 'date_equals' => 'The :attribute must be a date equal to :date.', 'date_format' => 'The :attribute does not match the format :format.', + 'decimal' => 'The :attribute must have :decimal decimal places.', 'declined' => 'The :attribute must be declined.', 'declined_if' => 'The :attribute must be declined when :other is :value.', 'different' => 'The :attribute and :other must be different.', @@ -43,22 +45,25 @@ 'digits_between' => 'The :attribute must be between :min and :max digits.', 'dimensions' => 'The :attribute has invalid image dimensions.', 'distinct' => 'The :attribute field has a duplicate value.', + 'doesnt_end_with' => 'The :attribute may not end with one of the following: :values.', + 'doesnt_start_with' => 'The :attribute may not start with one of the following: :values.', 'email' => 'The :attribute must be a valid email address.', 'ends_with' => 'The :attribute must end with one of the following: :values.', + 'enum' => 'The selected :attribute is invalid.', 'exists' => 'The selected :attribute is invalid.', 'file' => 'The :attribute must be a file.', 'filled' => 'The :attribute field must have a value.', 'gt' => [ - 'numeric' => 'The :attribute must be greater than :value.', + 'array' => 'The :attribute must have more than :value items.', 'file' => 'The :attribute must be greater than :value kilobytes.', + 'numeric' => 'The :attribute must be greater than :value.', 'string' => 'The :attribute must be greater than :value characters.', - 'array' => 'The :attribute must have more than :value items.', ], 'gte' => [ - 'numeric' => 'The :attribute must be greater than or equal to :value.', + 'array' => 'The :attribute must have :value items or more.', 'file' => 'The :attribute must be greater than or equal to :value kilobytes.', + 'numeric' => 'The :attribute must be greater than or equal to :value.', 'string' => 'The :attribute must be greater than or equal to :value characters.', - 'array' => 'The :attribute must have :value items or more.', ], 'image' => 'The :attribute must be an image.', 'in' => 'The selected :attribute is invalid.', @@ -68,37 +73,47 @@ 'ipv4' => 'The :attribute must be a valid IPv4 address.', 'ipv6' => 'The :attribute must be a valid IPv6 address.', 'json' => 'The :attribute must be a valid JSON string.', + 'lowercase' => 'The :attribute must be lowercase.', 'lt' => [ - 'numeric' => 'The :attribute must be less than :value.', + 'array' => 'The :attribute must have less than :value items.', 'file' => 'The :attribute must be less than :value kilobytes.', + 'numeric' => 'The :attribute must be less than :value.', 'string' => 'The :attribute must be less than :value characters.', - 'array' => 'The :attribute must have less than :value items.', ], 'lte' => [ - 'numeric' => 'The :attribute must be less than or equal to :value.', + 'array' => 'The :attribute must not have more than :value items.', 'file' => 'The :attribute must be less than or equal to :value kilobytes.', + 'numeric' => 'The :attribute must be less than or equal to :value.', 'string' => 'The :attribute must be less than or equal to :value characters.', - 'array' => 'The :attribute must not have more than :value items.', ], + 'mac_address' => 'The :attribute must be a valid MAC address.', 'max' => [ - 'numeric' => 'The :attribute must not be greater than :max.', + 'array' => 'The :attribute must not have more than :max items.', 'file' => 'The :attribute must not be greater than :max kilobytes.', + 'numeric' => 'The :attribute must not be greater than :max.', 'string' => 'The :attribute must not be greater than :max characters.', - 'array' => 'The :attribute must not have more than :max items.', ], + 'max_digits' => 'The :attribute must not have more than :max digits.', 'mimes' => 'The :attribute must be a file of type: :values.', 'mimetypes' => 'The :attribute must be a file of type: :values.', 'min' => [ - 'numeric' => 'The :attribute must be at least :min.', + 'array' => 'The :attribute must have at least :min items.', 'file' => 'The :attribute must be at least :min kilobytes.', + 'numeric' => 'The :attribute must be at least :min.', 'string' => 'The :attribute must be at least :min characters.', - 'array' => 'The :attribute must have at least :min items.', ], + 'min_digits' => 'The :attribute must have at least :min digits.', 'multiple_of' => 'The :attribute must be a multiple of :value.', 'not_in' => 'The selected :attribute is invalid.', 'not_regex' => 'The :attribute format is invalid.', 'numeric' => 'The :attribute must be a number.', - 'password' => 'The password is incorrect.', + 'password' => [ + 'letters' => 'The :attribute must contain at least one letter.', + 'mixed' => 'The :attribute must contain at least one uppercase and one lowercase letter.', + 'numbers' => 'The :attribute must contain at least one number.', + 'symbols' => 'The :attribute must contain at least one symbol.', + 'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.', + ], 'present' => 'The :attribute field must be present.', 'prohibited' => 'The :attribute field is prohibited.', 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.', @@ -106,7 +121,9 @@ 'prohibits' => 'The :attribute field prohibits :other from being present.', 'regex' => 'The :attribute format is invalid.', 'required' => 'The :attribute field is required.', + 'required_array_keys' => 'The :attribute field must contain entries for: :values.', 'required_if' => 'The :attribute field is required when :other is :value.', + 'required_if_accepted' => 'The :attribute field is required when :other is accepted.', 'required_unless' => 'The :attribute field is required unless :other is in :values.', 'required_with' => 'The :attribute field is required when :values is present.', 'required_with_all' => 'The :attribute field is required when :values are present.', @@ -114,17 +131,19 @@ 'required_without_all' => 'The :attribute field is required when none of :values are present.', 'same' => 'The :attribute and :other must match.', 'size' => [ - 'numeric' => 'The :attribute must be :size.', + 'array' => 'The :attribute must contain :size items.', 'file' => 'The :attribute must be :size kilobytes.', + 'numeric' => 'The :attribute must be :size.', 'string' => 'The :attribute must be :size characters.', - 'array' => 'The :attribute must contain :size items.', ], 'starts_with' => 'The :attribute must start with one of the following: :values.', 'string' => 'The :attribute must be a string.', 'timezone' => 'The :attribute must be a valid timezone.', 'unique' => 'The :attribute has already been taken.', 'uploaded' => 'The :attribute failed to upload.', + 'uppercase' => 'The :attribute must be uppercase.', 'url' => 'The :attribute must be a valid URL.', + 'ulid' => 'The :attribute must be a valid ULID.', 'uuid' => 'The :attribute must be a valid UUID.', /* diff --git a/public/index.php b/public/index.php index 002ee24d..1d69f3a2 100644 --- a/public/index.php +++ b/public/index.php @@ -16,8 +16,8 @@ | */ -if (file_exists(__DIR__.'/../storage/framework/maintenance.php')) { - require __DIR__.'/../storage/framework/maintenance.php'; +if (file_exists($maintenance = __DIR__.'/../storage/framework/maintenance.php')) { + require $maintenance; } /* diff --git a/server.php b/server.php deleted file mode 100644 index 5fb6379e..00000000 --- a/server.php +++ /dev/null @@ -1,21 +0,0 @@ - - */ - -$uri = urldecode( - parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) -); - -// This file allows us to emulate Apache's "mod_rewrite" functionality from the -// built-in PHP web server. This provides a convenient way to test a Laravel -// application without having installed a "real" web server software here. -if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { - return false; -} - -require_once __DIR__.'/public/index.php'; From 56ab3f8e9166e7498d4f3e8bfd597190d54d2d25 Mon Sep 17 00:00:00 2001 From: Shift Date: Mon, 12 Feb 2024 23:17:40 +0000 Subject: [PATCH 08/21] Convert `optional()` to nullsafe operator --- app/Providers/RouteServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 7210922c..b0454a52 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -62,7 +62,7 @@ public function boot() protected function configureRateLimiting() { RateLimiter::for('api', function (Request $request) { - return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip()); + return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip()); }); } } From 07fd409b36953a909ed7301a90a0dc16302603f7 Mon Sep 17 00:00:00 2001 From: Shift Date: Mon, 12 Feb 2024 23:17:41 +0000 Subject: [PATCH 09/21] Convert route options to fluent methods Laravel 8 adopts the tuple syntax for controller actions. Since the old options array is incompatible with this syntax, Shift converted them to use modern, fluent methods. --- routes/web.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/routes/web.php b/routes/web.php index 39fdd95b..ec53391d 100644 --- a/routes/web.php +++ b/routes/web.php @@ -103,7 +103,7 @@ // Wilayah Route::get('wilayah', WilayahController::class); -Route::group(['middleware' => 'auth'], function () { +Route::middleware('auth')->group(function () { // Dashboard Route::get('dashboard', [DashboardController::class, 'index'])->name('dashboard'); @@ -130,7 +130,7 @@ }); // Wilayah Kecamatan - Route::resource('kecamatan', KecamatanController::class, ['except' => ['show']]); + Route::resource('kecamatan', KecamatanController::class)->except('show'); // Route::prefix('kecamatan')->group(function () { // Route::get('/datatables', [KecamatanController::class, 'datatables'])->name('kecamatan.datatables'); @@ -138,7 +138,7 @@ // Wilayah Desa / Keluarahan - Route::resource('desa', DesaController::class, ['except' => ['show']]); + Route::resource('desa', DesaController::class)->except('show'); Route::get('desa/import', [DesaController::class, 'import'])->name('desa.import'); Route::post('desa/proses-import', [DesaController::class, 'prosesImport'])->name('desa.proses-import'); Route::get('desa/contoh-import', [DesaController::class, 'contohImport'])->name('desa.contoh-import'); From b2febf1076a4daf36732db9c37bc256c2597aedb Mon Sep 17 00:00:00 2001 From: Shift Date: Mon, 12 Feb 2024 23:17:41 +0000 Subject: [PATCH 10/21] Adopt class based routes --- app/Providers/RouteServiceProvider.php | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index b0454a52..b65cbc0c 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -19,15 +19,6 @@ class RouteServiceProvider extends ServiceProvider */ public const HOME = '/dashboard'; - /** - * The controller namespace for the application. - * - * When present, controller route declarations will automatically be prefixed with this namespace. - * - * @var string|null - */ - // protected $namespace = 'App\\Http\\Controllers'; - /** * Define your route model bindings, pattern filters, etc. * @@ -40,16 +31,13 @@ public function boot() $this->routes(function () { Route::prefix('api') ->middleware('api') - ->namespace($this->namespace) ->group(base_path('routes/api.php')); Route::prefix('api/v1') ->middleware('api') - ->namespace($this->namespace) ->group(base_path('routes/apiv1.php')); Route::middleware('web') - ->namespace($this->namespace) ->group(base_path('routes/web.php')); }); } From 3b6c68dca11005c48224f26d4255b3ddf9590b9e Mon Sep 17 00:00:00 2001 From: Shift Date: Mon, 12 Feb 2024 23:17:42 +0000 Subject: [PATCH 11/21] Shift config files --- .env.example | 2 +- config/app.php | 18 ++++++++++++++++++ config/broadcasting.php | 10 ++++++++-- config/cache.php | 8 ++++---- config/database.php | 2 +- config/filesystems.php | 7 +++++-- config/hashing.php | 6 +++--- config/logging.php | 8 ++++++-- config/mail.php | 4 ++-- config/services.php | 1 + config/session.php | 6 +++--- 11 files changed, 52 insertions(+), 20 deletions(-) diff --git a/.env.example b/.env.example index 4f7c9fd6..20d4f6cb 100644 --- a/.env.example +++ b/.env.example @@ -19,7 +19,7 @@ DB_PASSWORD= BROADCAST_DRIVER=log CACHE_DRIVER=file -FILESYSTEM_DRIVER=local +FILESYSTEM_DISK=local QUEUE_CONNECTION=sync SESSION_DRIVER=file SESSION_LIFETIME=120 diff --git a/config/app.php b/config/app.php index 7a23f4e7..e8582dc4 100644 --- a/config/app.php +++ b/config/app.php @@ -123,6 +123,24 @@ 'cipher' => 'AES-256-CBC', + /* + |-------------------------------------------------------------------------- + | Maintenance Mode Driver + |-------------------------------------------------------------------------- + | + | These configuration options determine the driver used to determine and + | manage Laravel's "maintenance mode" status. The "cache" driver will + | allow maintenance mode to be controlled across multiple machines. + | + | Supported drivers: "file", "cache" + | + */ + + 'maintenance' => [ + 'driver' => 'file', + // 'store' => 'redis', + ], + /* |-------------------------------------------------------------------------- | Autoloaded Service Providers diff --git a/config/broadcasting.php b/config/broadcasting.php index 2d529820..9e4d4aa4 100644 --- a/config/broadcasting.php +++ b/config/broadcasting.php @@ -36,8 +36,14 @@ 'secret' => env('PUSHER_APP_SECRET'), 'app_id' => env('PUSHER_APP_ID'), 'options' => [ - 'cluster' => env('PUSHER_APP_CLUSTER'), - 'useTLS' => true, + 'host' => env('PUSHER_HOST') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com', + 'port' => env('PUSHER_PORT', 443), + 'scheme' => env('PUSHER_SCHEME', 'https'), + 'encrypted' => true, + 'useTLS' => env('PUSHER_SCHEME', 'https') === 'https', + ], + 'client_options' => [ + // Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html ], ], diff --git a/config/cache.php b/config/cache.php index 8736c7a7..33bb2954 100644 --- a/config/cache.php +++ b/config/cache.php @@ -99,12 +99,12 @@ | Cache Key Prefix |-------------------------------------------------------------------------- | - | When utilizing a RAM based store such as APC or Memcached, there might - | be other applications utilizing the same cache. So, we'll specify a - | value to get prefixed to all our keys so we can avoid collisions. + | When utilizing the APC, database, memcached, Redis, or DynamoDB cache + | stores there might be other applications using the same cache. For + | that reason, you may prefix every cache key to avoid collisions. | */ - 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'), + 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'), ]; diff --git a/config/database.php b/config/database.php index 23375de1..84d1e418 100644 --- a/config/database.php +++ b/config/database.php @@ -83,7 +83,7 @@ 'charset' => 'utf8', 'prefix' => '', 'prefix_indexes' => true, - 'schema' => 'public', + 'search_path' => 'public', 'sslmode' => 'prefer', ], diff --git a/config/filesystems.php b/config/filesystems.php index 760ef972..e9d9dbdb 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -13,7 +13,7 @@ | */ - 'default' => env('FILESYSTEM_DRIVER', 'local'), + 'default' => env('FILESYSTEM_DISK', 'local'), /* |-------------------------------------------------------------------------- @@ -22,7 +22,7 @@ | | Here you may configure as many filesystem "disks" as you wish, and you | may even configure multiple disks of the same driver. Defaults have - | been setup for each driver as an example of the required options. + | been set up for each driver as an example of the required values. | | Supported Drivers: "local", "ftp", "sftp", "s3" | @@ -33,6 +33,7 @@ 'local' => [ 'driver' => 'local', 'root' => storage_path('app'), + 'throw' => false, ], 'public' => [ @@ -40,6 +41,7 @@ 'root' => storage_path('app/public'), 'url' => env('APP_URL').'/storage', 'visibility' => 'public', + 'throw' => false, ], 's3' => [ @@ -51,6 +53,7 @@ 'url' => env('AWS_URL'), 'endpoint' => env('AWS_ENDPOINT'), 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false), + 'throw' => false, ], ], diff --git a/config/hashing.php b/config/hashing.php index 84257708..bcd3be4c 100644 --- a/config/hashing.php +++ b/config/hashing.php @@ -44,9 +44,9 @@ */ 'argon' => [ - 'memory' => 1024, - 'threads' => 2, - 'time' => 2, + 'memory' => 65536, + 'threads' => 1, + 'time' => 4, ], ]; diff --git a/config/logging.php b/config/logging.php index 880cd922..5aa1dbb7 100644 --- a/config/logging.php +++ b/config/logging.php @@ -30,7 +30,10 @@ | */ - 'deprecations' => env('LOG_DEPRECATIONS_CHANNEL', 'null'), + 'deprecations' => [ + 'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'), + 'trace' => false, + ], /* |-------------------------------------------------------------------------- @@ -78,10 +81,11 @@ 'papertrail' => [ 'driver' => 'monolog', 'level' => env('LOG_LEVEL', 'debug'), - 'handler' => SyslogUdpHandler::class, + 'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class), 'handler_with' => [ 'host' => env('PAPERTRAIL_URL'), 'port' => env('PAPERTRAIL_PORT'), + 'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'), ], ], diff --git a/config/mail.php b/config/mail.php index f96c6c7c..534395a3 100644 --- a/config/mail.php +++ b/config/mail.php @@ -42,7 +42,7 @@ 'username' => env('MAIL_USERNAME'), 'password' => env('MAIL_PASSWORD'), 'timeout' => null, - 'auth_mode' => null, + 'local_domain' => env('MAIL_EHLO_DOMAIN'), ], 'ses' => [ @@ -59,7 +59,7 @@ 'sendmail' => [ 'transport' => 'sendmail', - 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -t -i'), + 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'), ], 'log' => [ diff --git a/config/services.php b/config/services.php index 2a1d616c..0ace530e 100644 --- a/config/services.php +++ b/config/services.php @@ -18,6 +18,7 @@ 'domain' => env('MAILGUN_DOMAIN'), 'secret' => env('MAILGUN_SECRET'), 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), + 'scheme' => 'https', ], 'postmark' => [ diff --git a/config/session.php b/config/session.php index ac0802b1..8fed97c0 100644 --- a/config/session.php +++ b/config/session.php @@ -72,7 +72,7 @@ | */ - 'connection' => env('SESSION_CONNECTION', null), + 'connection' => env('SESSION_CONNECTION'), /* |-------------------------------------------------------------------------- @@ -100,7 +100,7 @@ | */ - 'store' => env('SESSION_STORE', null), + 'store' => env('SESSION_STORE'), /* |-------------------------------------------------------------------------- @@ -155,7 +155,7 @@ | */ - 'domain' => env('SESSION_DOMAIN', null), + 'domain' => env('SESSION_DOMAIN'), /* |-------------------------------------------------------------------------- From 2a6abc8915faa47420546b6599674751c913f342 Mon Sep 17 00:00:00 2001 From: Shift Date: Mon, 12 Feb 2024 23:17:42 +0000 Subject: [PATCH 12/21] Default config files In an effort to make upgrading the constantly changing config files easier, Shift defaulted them and merged your true customizations - where ENV variables may not be used. --- config/app.php | 47 ++++------------------------------------------- config/auth.php | 2 +- 2 files changed, 5 insertions(+), 44 deletions(-) diff --git a/config/app.php b/config/app.php index e8582dc4..fedc21ff 100644 --- a/config/app.php +++ b/config/app.php @@ -1,5 +1,7 @@ [ - - 'App' => Illuminate\Support\Facades\App::class, - 'Arr' => Illuminate\Support\Arr::class, - 'Artisan' => Illuminate\Support\Facades\Artisan::class, - 'Auth' => Illuminate\Support\Facades\Auth::class, - 'Blade' => Illuminate\Support\Facades\Blade::class, - 'Broadcast' => Illuminate\Support\Facades\Broadcast::class, - 'Bus' => Illuminate\Support\Facades\Bus::class, - 'Cache' => Illuminate\Support\Facades\Cache::class, - 'Config' => Illuminate\Support\Facades\Config::class, - 'Cookie' => Illuminate\Support\Facades\Cookie::class, - 'Crypt' => Illuminate\Support\Facades\Crypt::class, - 'Date' => Illuminate\Support\Facades\Date::class, - 'DB' => Illuminate\Support\Facades\DB::class, - 'Eloquent' => Illuminate\Database\Eloquent\Model::class, - 'Event' => Illuminate\Support\Facades\Event::class, + 'aliases' => Facade::defaultAliases()->merge([ 'Excel' => Maatwebsite\Excel\Facades\Excel::class, - 'File' => Illuminate\Support\Facades\File::class, - 'Gate' => Illuminate\Support\Facades\Gate::class, - 'Hash' => Illuminate\Support\Facades\Hash::class, - 'Http' => Illuminate\Support\Facades\Http::class, - 'Js' => Illuminate\Support\Js::class, - 'Lang' => Illuminate\Support\Facades\Lang::class, - 'Log' => Illuminate\Support\Facades\Log::class, - 'Mail' => Illuminate\Support\Facades\Mail::class, - 'Notification' => Illuminate\Support\Facades\Notification::class, - 'Password' => Illuminate\Support\Facades\Password::class, - 'Queue' => Illuminate\Support\Facades\Queue::class, - 'RateLimiter' => Illuminate\Support\Facades\RateLimiter::class, - 'Redirect' => Illuminate\Support\Facades\Redirect::class, - // 'Redis' => Illuminate\Support\Facades\Redis::class, - 'Request' => Illuminate\Support\Facades\Request::class, - 'Response' => Illuminate\Support\Facades\Response::class, - 'Route' => Illuminate\Support\Facades\Route::class, - 'Schema' => Illuminate\Support\Facades\Schema::class, - 'Session' => Illuminate\Support\Facades\Session::class, - 'Storage' => Illuminate\Support\Facades\Storage::class, - 'Str' => Illuminate\Support\Str::class, - 'URL' => Illuminate\Support\Facades\URL::class, - 'Validator' => Illuminate\Support\Facades\Validator::class, - 'View' => Illuminate\Support\Facades\View::class, - - ], + ])->toArray(), ]; diff --git a/config/auth.php b/config/auth.php index e29a3f7d..d8c6cee7 100644 --- a/config/auth.php +++ b/config/auth.php @@ -80,7 +80,7 @@ | than one user table or model in the application and you want to have | separate password reset settings based on the specific user types. | - | The expire time is the number of minutes that the reset token should be + | The expire time is the number of minutes that each reset token will be | considered valid. This security feature keeps tokens short-lived so | they have less time to be guessed. You may change this as needed. | From 89fcc3d04b6d5242ead093eee9139e1518fad949 Mon Sep 17 00:00:00 2001 From: Shift Date: Mon, 12 Feb 2024 23:17:43 +0000 Subject: [PATCH 13/21] Bump Composer dependencies --- composer.json | 24 ++++++++++++------------ package.json | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/composer.json b/composer.json index ffa8d2fc..e8554f8d 100644 --- a/composer.json +++ b/composer.json @@ -8,30 +8,30 @@ ], "license": "MIT", "require": { - "php": "^7.3|^8.0", + "php": "^8.0", "doctrine/dbal": "^3.6", - "guzzlehttp/guzzle": "^7.0.1", + "guzzlehttp/guzzle": "^7.2", "jeroennoten/laravel-adminlte": "^3.7", - "laravel/framework": "^8.65", - "laravel/sanctum": "^2.11", + "laravel/framework": "^9.52", + "laravel/sanctum": "^3.0", "laravel/telescope": "^4.9", - "laravel/tinker": "^2.5", + "laravel/tinker": "^2.7", "laravel/ui": "^3.4", "maatwebsite/excel": "^3.1", "spatie/db-dumper": "^2.21", - "spatie/laravel-backup": "^6.16", - "yajra/laravel-datatables-oracle": "^9.18", - "laravel/helpers": "^1.3", + "spatie/laravel-backup": "^8.0", + "yajra/laravel-datatables-oracle": "^9.19", + "laravel/helpers": "^1.5", "league/flysystem-aws-s3-v3": "^3.0" }, "require-dev": { "barryvdh/laravel-debugbar": "^3.6", - "facade/ignition": "^2.5", "fakerphp/faker": "^1.9.1", - "laravel/sail": "^1.0.1", + "laravel/sail": "^1.15", "mockery/mockery": "^1.4.4", - "nunomaduro/collision": "^5.10", - "phpunit/phpunit": "^9.5.10" + "nunomaduro/collision": "^6.3", + "phpunit/phpunit": "^9.5.10", + "spatie/laravel-ignition": "^1.4" }, "autoload": { "psr-4": { diff --git a/package.json b/package.json index 00c65067..7a9aecdf 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "production": "mix --production" }, "devDependencies": { - "axios": "^0.21", + "axios": "^0.25", "laravel-mix": "^6.0.6", "lodash": "^4.17.19", "postcss": "^8.1.14" From 739481048d2a261726b0ada8b5df0f2acac0c291 Mon Sep 17 00:00:00 2001 From: Shift Date: Mon, 12 Feb 2024 23:17:43 +0000 Subject: [PATCH 14/21] Use `` tags for configuration `` tags have a lower precedence than system environment variables making it easier to overwrite PHPUnit configuration values in additional environments, such a CI. Review this blog post for more details on configuration precedence when testing Laravel: https://jasonmccreary.me/articles/laravel-testing-configuration-precedence/ --- phpunit.xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/phpunit.xml b/phpunit.xml index 4ae4d979..2ac86a18 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -18,14 +18,14 @@ - - - - - - - - - + + + + + + + + + From 22728192250a83ae03a5b636f5db2bf8ce291a5a Mon Sep 17 00:00:00 2001 From: Shift Date: Mon, 12 Feb 2024 23:17:46 +0000 Subject: [PATCH 15/21] Adopt anonymous migrations --- .../2014_10_12_100000_create_password_resets_table.php | 4 ++-- .../migrations/2019_08_19_000000_create_failed_jobs_table.php | 4 ++-- .../2019_12_14_000001_create_personal_access_tokens_table.php | 4 ++-- database/migrations/2021_12_21_100083_create_users_table.php | 4 ++-- database/migrations/2021_12_21_100822_create_desa_table.php | 4 ++-- .../migrations/2021_12_21_100822_create_notifikasi_table.php | 4 ++-- .../migrations/2021_12_21_100822_create_user_grup_table.php | 4 ++-- database/migrations/2021_12_21_100823_create_akses_table.php | 4 ++-- .../2021_12_21_100823_create_notifikasi_desa_table.php | 4 ++-- .../migrations/2021_12_21_100823_create_tbl_regions_table.php | 4 ++-- .../migrations/2021_12_21_100824_create_kode_wilayah_view.php | 4 ++-- database/migrations/2022_07_11_151743_konversi_domain.php | 4 ++-- database/migrations/2022_07_12_153833_alter_tbl_regions.php | 4 ++-- database/migrations/2022_07_14_002933_alter_table_desa.php | 4 ++-- .../2022_07_19_135116_perbaiki_view_kode_wilayah.php | 4 ++-- .../2022_07_19_152539_hapus_kolom_jeni_desa_persiapan.php | 4 ++-- database/migrations/2022_09_18_125400_modul_tte.php | 4 ++-- database/migrations/2022_09_19_121753_bps-kemendagri.php | 4 ++-- database/migrations/2022_09_22_000339_create_opendk.php | 4 ++-- database/migrations/2022_11_25_202534_tambahrecordopendk.php | 4 ++-- database/migrations/2022_12_15_082327_addtablepengaturan.php | 4 ++-- database/migrations/2022_12_26_143228_trackmobile.php | 4 ++-- .../2023_06_01_111807_alter_table_desa_kodepos_lat_lng.php | 4 ++-- .../2023_07_06_095056_add_column_additional_info_desa.php | 4 ++-- .../2023_07_08_085348_add_batas_wilayah_open_d_k.php | 4 ++-- .../2023_07_10_104520_add_data_pengaturan_aplikasi.php | 4 ++-- ...023_07_10_110515_add_data_black_list_domain_pengaturan.php | 4 ++-- .../migrations/2023_07_12_085959_add_region_softdelete.php | 4 ++-- .../migrations/2023_07_12_101521_alter_view_kode_wilayah.php | 4 ++-- .../2023_07_16_200135_add_unique_constraint_kodedesa.php | 4 ++-- .../2023_11_04_192516_modify_pengaturan_aplikasi_table.php | 4 ++-- .../migrations/2023_11_06_241521_modify_view_kode_wilayah.php | 4 ++-- ...11_10_210253_modify_pengaturan_aplikasi_tanggal_backup.php | 4 ++-- 33 files changed, 66 insertions(+), 66 deletions(-) diff --git a/database/migrations/2014_10_12_100000_create_password_resets_table.php b/database/migrations/2014_10_12_100000_create_password_resets_table.php index 0ee0a36a..fcacb80b 100644 --- a/database/migrations/2014_10_12_100000_create_password_resets_table.php +++ b/database/migrations/2014_10_12_100000_create_password_resets_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreatePasswordResetsTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -29,4 +29,4 @@ public function down() { Schema::dropIfExists('password_resets'); } -} +}; diff --git a/database/migrations/2019_08_19_000000_create_failed_jobs_table.php b/database/migrations/2019_08_19_000000_create_failed_jobs_table.php index 6aa6d743..17191986 100644 --- a/database/migrations/2019_08_19_000000_create_failed_jobs_table.php +++ b/database/migrations/2019_08_19_000000_create_failed_jobs_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateFailedJobsTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -33,4 +33,4 @@ public function down() { Schema::dropIfExists('failed_jobs'); } -} +}; diff --git a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php b/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php index 4315e16a..fd235f8c 100644 --- a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php +++ b/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreatePersonalAccessTokensTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -33,4 +33,4 @@ public function down() { Schema::dropIfExists('personal_access_tokens'); } -} +}; diff --git a/database/migrations/2021_12_21_100083_create_users_table.php b/database/migrations/2021_12_21_100083_create_users_table.php index 283719c6..99fcce22 100644 --- a/database/migrations/2021_12_21_100083_create_users_table.php +++ b/database/migrations/2021_12_21_100083_create_users_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateUsersTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -37,4 +37,4 @@ public function down() { Schema::dropIfExists('users'); } -} +}; diff --git a/database/migrations/2021_12_21_100822_create_desa_table.php b/database/migrations/2021_12_21_100822_create_desa_table.php index 3bb5ace9..9753b545 100644 --- a/database/migrations/2021_12_21_100822_create_desa_table.php +++ b/database/migrations/2021_12_21_100822_create_desa_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateDesaTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -54,4 +54,4 @@ public function down() { Schema::dropIfExists('desa'); } -} +}; diff --git a/database/migrations/2021_12_21_100822_create_notifikasi_table.php b/database/migrations/2021_12_21_100822_create_notifikasi_table.php index 74908f80..0b5aae7e 100644 --- a/database/migrations/2021_12_21_100822_create_notifikasi_table.php +++ b/database/migrations/2021_12_21_100822_create_notifikasi_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateNotifikasiTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -35,4 +35,4 @@ public function down() { Schema::dropIfExists('notifikasi'); } -} +}; diff --git a/database/migrations/2021_12_21_100822_create_user_grup_table.php b/database/migrations/2021_12_21_100822_create_user_grup_table.php index dd811788..2096ed7b 100644 --- a/database/migrations/2021_12_21_100822_create_user_grup_table.php +++ b/database/migrations/2021_12_21_100822_create_user_grup_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateUserGrupTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -29,4 +29,4 @@ public function down() { Schema::dropIfExists('user_grup'); } -} +}; diff --git a/database/migrations/2021_12_21_100823_create_akses_table.php b/database/migrations/2021_12_21_100823_create_akses_table.php index 1e100cca..0ae2a3fb 100644 --- a/database/migrations/2021_12_21_100823_create_akses_table.php +++ b/database/migrations/2021_12_21_100823_create_akses_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateAksesTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -35,4 +35,4 @@ public function down() { Schema::dropIfExists('akses'); } -} +}; diff --git a/database/migrations/2021_12_21_100823_create_notifikasi_desa_table.php b/database/migrations/2021_12_21_100823_create_notifikasi_desa_table.php index 6f602e6f..032df8d2 100644 --- a/database/migrations/2021_12_21_100823_create_notifikasi_desa_table.php +++ b/database/migrations/2021_12_21_100823_create_notifikasi_desa_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateNotifikasiDesaTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -32,4 +32,4 @@ public function down() { Schema::dropIfExists('notifikasi_desa'); } -} +}; diff --git a/database/migrations/2021_12_21_100823_create_tbl_regions_table.php b/database/migrations/2021_12_21_100823_create_tbl_regions_table.php index 6e81c6bf..7724b220 100644 --- a/database/migrations/2021_12_21_100823_create_tbl_regions_table.php +++ b/database/migrations/2021_12_21_100823_create_tbl_regions_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateTblRegionsTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -31,4 +31,4 @@ public function down() { Schema::dropIfExists('tbl_regions'); } -} +}; diff --git a/database/migrations/2021_12_21_100824_create_kode_wilayah_view.php b/database/migrations/2021_12_21_100824_create_kode_wilayah_view.php index 011b2146..f57fae20 100644 --- a/database/migrations/2021_12_21_100824_create_kode_wilayah_view.php +++ b/database/migrations/2021_12_21_100824_create_kode_wilayah_view.php @@ -3,7 +3,7 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Support\Facades\DB; -class CreateKodeWilayahView extends Migration +return new class extends Migration { /** * Run the migrations. @@ -24,4 +24,4 @@ public function down() { DB::statement("DROP VIEW IF EXISTS kode_wilayah"); } -} +}; diff --git a/database/migrations/2022_07_11_151743_konversi_domain.php b/database/migrations/2022_07_11_151743_konversi_domain.php index aee7076b..77734ad5 100644 --- a/database/migrations/2022_07_11_151743_konversi_domain.php +++ b/database/migrations/2022_07_11_151743_konversi_domain.php @@ -5,7 +5,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; -class KonversiDomain extends Migration +return new class extends Migration { /** * Run the migrations. @@ -34,4 +34,4 @@ public function down() { // } -} +}; diff --git a/database/migrations/2022_07_12_153833_alter_tbl_regions.php b/database/migrations/2022_07_12_153833_alter_tbl_regions.php index ce08ce20..7b90ad4f 100644 --- a/database/migrations/2022_07_12_153833_alter_tbl_regions.php +++ b/database/migrations/2022_07_12_153833_alter_tbl_regions.php @@ -6,7 +6,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; -class AlterTblRegions extends Migration +return new class extends Migration { /** * Run the migrations. @@ -44,4 +44,4 @@ public function down() $table->dropColumn(['new_region_name', 'jenis', 'keterangan', 'created_by', 'updated_by', 'created_at', 'updated_at']); }); } -} +}; diff --git a/database/migrations/2022_07_14_002933_alter_table_desa.php b/database/migrations/2022_07_14_002933_alter_table_desa.php index 9c62962d..37e1faed 100644 --- a/database/migrations/2022_07_14_002933_alter_table_desa.php +++ b/database/migrations/2022_07_14_002933_alter_table_desa.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class AlterTableDesa extends Migration +return new class extends Migration { /** * Run the migrations. @@ -29,4 +29,4 @@ public function down() $table->dropColumn('sebutan_desa'); }); } -} +}; diff --git a/database/migrations/2022_07_19_135116_perbaiki_view_kode_wilayah.php b/database/migrations/2022_07_19_135116_perbaiki_view_kode_wilayah.php index 6b18e02e..e593bea3 100644 --- a/database/migrations/2022_07_19_135116_perbaiki_view_kode_wilayah.php +++ b/database/migrations/2022_07_19_135116_perbaiki_view_kode_wilayah.php @@ -5,7 +5,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; -class PerbaikiViewKodeWilayah extends Migration +return new class extends Migration { /** * Run the migrations. @@ -26,4 +26,4 @@ public function down() { DB::statement("CREATE OR REPLACE VIEW `kode_wilayah` AS select `d`.`id` AS `id`,`p`.`region_code` AS `kode_prov`,`p`.`region_name` AS `nama_prov`,`kab`.`region_code` AS `kode_kab`,`kab`.`region_name` AS `nama_kab`,`kec`.`region_code` AS `kode_kec`,`kec`.`region_name` AS `nama_kec`,`d`.`region_code` AS `kode_desa`,`d`.`region_name` AS `nama_desa`,`d`.`desa_id` AS `desa_id` from (((`tbl_regions` `d` left join `tbl_regions` `kec` on((`d`.`parent_code` = `kec`.`region_code`))) left join `tbl_regions` `kab` on((`kec`.`parent_code` = `kab`.`region_code`))) left join `tbl_regions` `p` on((`kab`.`parent_code` = `p`.`region_code`))) where (char_length(`d`.`region_code`) = 13)"); } -} +}; diff --git a/database/migrations/2022_07_19_152539_hapus_kolom_jeni_desa_persiapan.php b/database/migrations/2022_07_19_152539_hapus_kolom_jeni_desa_persiapan.php index 6e94450d..6c9a0c23 100644 --- a/database/migrations/2022_07_19_152539_hapus_kolom_jeni_desa_persiapan.php +++ b/database/migrations/2022_07_19_152539_hapus_kolom_jeni_desa_persiapan.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class HapusKolomJeniDesaPersiapan extends Migration +return new class extends Migration { /** * Run the migrations. @@ -31,4 +31,4 @@ public function down() }); } -} +}; diff --git a/database/migrations/2022_09_18_125400_modul_tte.php b/database/migrations/2022_09_18_125400_modul_tte.php index 5f8634a3..cf5a030a 100644 --- a/database/migrations/2022_09_18_125400_modul_tte.php +++ b/database/migrations/2022_09_18_125400_modul_tte.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class ModulTte extends Migration +return new class extends Migration { /** * Run the migrations. @@ -31,4 +31,4 @@ public function down() $table->dropColumn('jml_surat_tte'); }); } -} +}; diff --git a/database/migrations/2022_09_19_121753_bps-kemendagri.php b/database/migrations/2022_09_19_121753_bps-kemendagri.php index 57c3e2a5..3c899728 100644 --- a/database/migrations/2022_09_19_121753_bps-kemendagri.php +++ b/database/migrations/2022_09_19_121753_bps-kemendagri.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class bpsKemendagri extends Migration +return new class extends Migration { /** * Run the migrations. @@ -61,4 +61,4 @@ public function down() Schema::dropIfExists('bps_kemendagri_kecamatan'); Schema::dropIfExists('bps_kemendagri_desa'); } -} +}; diff --git a/database/migrations/2022_09_22_000339_create_opendk.php b/database/migrations/2022_09_22_000339_create_opendk.php index 612f8f1d..9cae2305 100644 --- a/database/migrations/2022_09_22_000339_create_opendk.php +++ b/database/migrations/2022_09_22_000339_create_opendk.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateOpendk extends Migration +return new class extends Migration { /** * Run the migrations. @@ -40,4 +40,4 @@ public function down() { Schema::dropIfExists('opendk'); } -} +}; diff --git a/database/migrations/2022_11_25_202534_tambahrecordopendk.php b/database/migrations/2022_11_25_202534_tambahrecordopendk.php index a849166d..fdadc3d8 100644 --- a/database/migrations/2022_11_25_202534_tambahrecordopendk.php +++ b/database/migrations/2022_11_25_202534_tambahrecordopendk.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class Tambahrecordopendk extends Migration +return new class extends Migration { /** * Run the migrations. @@ -31,4 +31,4 @@ public function down() $table->dropColumn('nama_camat'); }); } -} +}; diff --git a/database/migrations/2022_12_15_082327_addtablepengaturan.php b/database/migrations/2022_12_15_082327_addtablepengaturan.php index 2bfe0b2d..5b247e76 100644 --- a/database/migrations/2022_12_15_082327_addtablepengaturan.php +++ b/database/migrations/2022_12_15_082327_addtablepengaturan.php @@ -5,7 +5,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; -class Addtablepengaturan extends Migration +return new class extends Migration { /** * Run the migrations. @@ -49,4 +49,4 @@ public function down() { Schema::dropIfExists('pengaturan_aplikasi'); } -} +}; diff --git a/database/migrations/2022_12_26_143228_trackmobile.php b/database/migrations/2022_12_26_143228_trackmobile.php index 31a16dd4..59792e77 100644 --- a/database/migrations/2022_12_26_143228_trackmobile.php +++ b/database/migrations/2022_12_26_143228_trackmobile.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class Trackmobile extends Migration +return new class extends Migration { /** * Run the migrations. @@ -30,4 +30,4 @@ public function down() { Schema::dropIfExists('opendk'); } -} +}; diff --git a/database/migrations/2023_06_01_111807_alter_table_desa_kodepos_lat_lng.php b/database/migrations/2023_06_01_111807_alter_table_desa_kodepos_lat_lng.php index 862cbe4c..95fa807b 100644 --- a/database/migrations/2023_06_01_111807_alter_table_desa_kodepos_lat_lng.php +++ b/database/migrations/2023_06_01_111807_alter_table_desa_kodepos_lat_lng.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class AlterTableDesaKodeposLatLng extends Migration +return new class extends Migration { /** * Run the migrations. @@ -33,4 +33,4 @@ public function down() $table->string('lng', 20)->change(); }); } -} +}; diff --git a/database/migrations/2023_07_06_095056_add_column_additional_info_desa.php b/database/migrations/2023_07_06_095056_add_column_additional_info_desa.php index 08b10211..44c727d3 100644 --- a/database/migrations/2023_07_06_095056_add_column_additional_info_desa.php +++ b/database/migrations/2023_07_06_095056_add_column_additional_info_desa.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class AddColumnAdditionalInfoDesa extends Migration +return new class extends Migration { /** * Run the migrations. @@ -47,4 +47,4 @@ public function down() $table->dropColumn('jml_keluarga'); }); } -} +}; diff --git a/database/migrations/2023_07_08_085348_add_batas_wilayah_open_d_k.php b/database/migrations/2023_07_08_085348_add_batas_wilayah_open_d_k.php index f6701948..987fd31e 100644 --- a/database/migrations/2023_07_08_085348_add_batas_wilayah_open_d_k.php +++ b/database/migrations/2023_07_08_085348_add_batas_wilayah_open_d_k.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class AddBatasWilayahOpenDK extends Migration +return new class extends Migration { /** * Run the migrations. @@ -41,4 +41,4 @@ public function down() $table->dropColumn('alamat'); }); } -} +}; diff --git a/database/migrations/2023_07_10_104520_add_data_pengaturan_aplikasi.php b/database/migrations/2023_07_10_104520_add_data_pengaturan_aplikasi.php index 36f79e99..a9e0355a 100644 --- a/database/migrations/2023_07_10_104520_add_data_pengaturan_aplikasi.php +++ b/database/migrations/2023_07_10_104520_add_data_pengaturan_aplikasi.php @@ -6,7 +6,7 @@ use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Schema; -class AddDataPengaturanAplikasi extends Migration +return new class extends Migration { /** * Run the migrations. @@ -37,4 +37,4 @@ public function down() { PengaturanAplikasi::where(['kategori' => 'setting', 'key' => 'wilayah_khusus'])->delete(); } -} +}; diff --git a/database/migrations/2023_07_10_110515_add_data_black_list_domain_pengaturan.php b/database/migrations/2023_07_10_110515_add_data_black_list_domain_pengaturan.php index 1b9caf22..4a97c1fd 100644 --- a/database/migrations/2023_07_10_110515_add_data_black_list_domain_pengaturan.php +++ b/database/migrations/2023_07_10_110515_add_data_black_list_domain_pengaturan.php @@ -7,7 +7,7 @@ use Illuminate\Support\Facades\Schema; -class AddDataBlackListDomainPengaturan extends Migration +return new class extends Migration { /** * Run the migrations. @@ -49,4 +49,4 @@ public function down() { PengaturanAplikasi::where(['kategori' => 'setting'])->whereIn('key', ['abaikan_domain_opensid', 'abaikan_domain_opendk'])->delete(); } -} +}; diff --git a/database/migrations/2023_07_12_085959_add_region_softdelete.php b/database/migrations/2023_07_12_085959_add_region_softdelete.php index 3847bc48..52349411 100644 --- a/database/migrations/2023_07_12_085959_add_region_softdelete.php +++ b/database/migrations/2023_07_12_085959_add_region_softdelete.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class AddRegionSoftdelete extends Migration +return new class extends Migration { /** * Run the migrations. @@ -29,4 +29,4 @@ public function down() $table->dropSoftDeletes(); }); } -} +}; diff --git a/database/migrations/2023_07_12_101521_alter_view_kode_wilayah.php b/database/migrations/2023_07_12_101521_alter_view_kode_wilayah.php index adf474cd..57fde515 100644 --- a/database/migrations/2023_07_12_101521_alter_view_kode_wilayah.php +++ b/database/migrations/2023_07_12_101521_alter_view_kode_wilayah.php @@ -5,7 +5,7 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; -class AlterViewKodeWilayah extends Migration +return new class extends Migration { /** * Run the migrations. @@ -66,4 +66,4 @@ public function down() { DB::statement("CREATE OR REPLACE VIEW `kode_wilayah` AS SELECT `d`.`id` AS `id`, `p`.`region_code` AS `kode_prov`, IF (`p`.`new_region_name` IS NULL, `p`.`region_name`, `p`.`new_region_name`) AS `nama_prov`, `kab`.`region_code` AS `kode_kab`, IF (`kab`.`new_region_name` IS NULL, `kab`.`region_name`, `kab`.`new_region_name`) AS `nama_kab`, `kec`.`region_code` AS `kode_kec`, IF (`kec`.`new_region_name` IS NULL, `kec`.`region_name`, `kec`.`new_region_name`) AS `nama_kec`, `d`.`region_code` AS `kode_desa`, IF (`d`.`new_region_name` IS NULL, `d`.`region_name`, `d`.`new_region_name`) AS `nama_desa`, `d`.`desa_id` AS `desa_id` FROM (((`tbl_regions` `d` left join `tbl_regions` `kec` on(`d`.`parent_code` = `kec`.`region_code`)) left join `tbl_regions` `kab` on(`kec`.`parent_code` = `kab`.`region_code`)) left join `tbl_regions` `p` on(`kab`.`parent_code` = `p`.`region_code`)) WHERE char_length(`d`.`region_code`) = 13"); } -} +}; diff --git a/database/migrations/2023_07_16_200135_add_unique_constraint_kodedesa.php b/database/migrations/2023_07_16_200135_add_unique_constraint_kodedesa.php index 7e57c806..264d0a6f 100644 --- a/database/migrations/2023_07_16_200135_add_unique_constraint_kodedesa.php +++ b/database/migrations/2023_07_16_200135_add_unique_constraint_kodedesa.php @@ -6,7 +6,7 @@ use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\DB; -class AddUniqueConstraintKodedesa extends Migration +return new class extends Migration { /** * Run the migrations. @@ -43,4 +43,4 @@ public function down() $table->dropUnique('uq_desa_kode_desa'); }); } -} +}; diff --git a/database/migrations/2023_11_04_192516_modify_pengaturan_aplikasi_table.php b/database/migrations/2023_11_04_192516_modify_pengaturan_aplikasi_table.php index 75303298..f2843335 100644 --- a/database/migrations/2023_11_04_192516_modify_pengaturan_aplikasi_table.php +++ b/database/migrations/2023_11_04_192516_modify_pengaturan_aplikasi_table.php @@ -3,7 +3,7 @@ use App\Models\PengaturanAplikasi; use Illuminate\Database\Migrations\Migration; -class ModifyPengaturanAplikasiTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -59,4 +59,4 @@ public function down() { // } -} +}; diff --git a/database/migrations/2023_11_06_241521_modify_view_kode_wilayah.php b/database/migrations/2023_11_06_241521_modify_view_kode_wilayah.php index 728d7ad5..94dd6768 100644 --- a/database/migrations/2023_11_06_241521_modify_view_kode_wilayah.php +++ b/database/migrations/2023_11_06_241521_modify_view_kode_wilayah.php @@ -3,7 +3,7 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Support\Facades\DB; -class ModifyViewKodeWilayah extends Migration +return new class extends Migration { /** * Run the migrations. @@ -50,4 +50,4 @@ public function down() { // } -} +}; diff --git a/database/migrations/2023_11_10_210253_modify_pengaturan_aplikasi_tanggal_backup.php b/database/migrations/2023_11_10_210253_modify_pengaturan_aplikasi_tanggal_backup.php index 6a3ffe3e..1d115645 100644 --- a/database/migrations/2023_11_10_210253_modify_pengaturan_aplikasi_tanggal_backup.php +++ b/database/migrations/2023_11_10_210253_modify_pengaturan_aplikasi_tanggal_backup.php @@ -3,7 +3,7 @@ use App\Models\PengaturanAplikasi; use Illuminate\Database\Migrations\Migration; -class ModifyPengaturanAplikasiTanggalBackup extends Migration +return new class extends Migration { /** * Run the migrations. @@ -39,4 +39,4 @@ public function down() { // } -} +}; From 3f2115ca18612811f2fe5ff63886e11d4f9d0fbe Mon Sep 17 00:00:00 2001 From: Shift Date: Mon, 12 Feb 2024 23:17:46 +0000 Subject: [PATCH 16/21] Add migration for Sanctum 3.0 --- ...res_at_to_personal_access_tokens_table.php | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 database/migrations/2024_02_12_000000_add_expires_at_to_personal_access_tokens_table.php diff --git a/database/migrations/2024_02_12_000000_add_expires_at_to_personal_access_tokens_table.php b/database/migrations/2024_02_12_000000_add_expires_at_to_personal_access_tokens_table.php new file mode 100644 index 00000000..74bd86b3 --- /dev/null +++ b/database/migrations/2024_02_12_000000_add_expires_at_to_personal_access_tokens_table.php @@ -0,0 +1,32 @@ +timestamp('expires_at')->nullable()->after('last_used_at'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('personal_access_tokens', function (Blueprint $table) { + $table->dropColumn('expires_at'); + }); + } +}; From 338994d4eee9ae5fb30005ccb11b29fc377d7757 Mon Sep 17 00:00:00 2001 From: Shift Date: Mon, 12 Feb 2024 23:17:50 +0000 Subject: [PATCH 17/21] Shift cleanup --- app/Providers/EventServiceProvider.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index 106b8d91..851e1b75 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -83,4 +83,3 @@ public function shouldDiscoverEvents() return false; } } - From 25052d999fce71d856ecd938b4d3aa3352d078c8 Mon Sep 17 00:00:00 2001 From: pandigresik Date: Tue, 13 Feb 2024 00:19:35 +0000 Subject: [PATCH 18/21] [ci skip] Fix styling --- app/Console/Kernel.php | 2 +- app/Helpers/helper.php | 2 +- app/Http/Controllers/Auth/RegisterController.php | 2 +- app/Http/Controllers/WilayahController.php | 2 +- app/Http/Kernel.php | 16 ++++++++-------- app/Http/Middleware/PantauMiddleware.php | 2 +- .../PreventRequestsDuringMaintenance.php | 8 ++++---- app/Http/Middleware/RedirectIfAuthenticated.php | 2 +- app/Http/Middleware/TracksidAuthentication.php | 4 ++-- app/Http/Middleware/WilayahMiddleware.php | 2 +- app/Http/Requests/Auth/LoginRequest.php | 4 ++-- 11 files changed, 23 insertions(+), 23 deletions(-) diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 80ef2228..d5c91f15 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -10,7 +10,7 @@ class Kernel extends ConsoleKernel /** * Define the application's command schedule. * - * @param \Illuminate\Console\Scheduling\Schedule $schedule + * @param Schedule $schedule * @return void */ protected function schedule(Schedule $schedule) diff --git a/app/Helpers/helper.php b/app/Helpers/helper.php index e75ed81a..55b8051f 100644 --- a/app/Helpers/helper.php +++ b/app/Helpers/helper.php @@ -130,7 +130,7 @@ function lastrelease($url) ->throw(); return json_decode($response->body()); - } catch (\Throwable $th) { + } catch (Throwable $th) { return false; } } diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index 69efd5f6..3bbce3c2 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -60,7 +60,7 @@ protected function validator(array $data) * Create a new user instance after a valid registration. * * @param array $data - * @return \App\Models\User + * @return User */ protected function create(array $data) { diff --git a/app/Http/Controllers/WilayahController.php b/app/Http/Controllers/WilayahController.php index a26dbac0..87e3de25 100644 --- a/app/Http/Controllers/WilayahController.php +++ b/app/Http/Controllers/WilayahController.php @@ -11,7 +11,7 @@ class WilayahController extends Controller /** * Handle the incoming request. * - * @param \Illuminate\Http\Request $request + * @param Request $request * @return \Illuminate\Http\Response */ public function __invoke(Request $request) diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 3b0325b3..aa26fbca 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -15,11 +15,11 @@ class Kernel extends HttpKernel */ protected $middleware = [ // \App\Http\Middleware\TrustHosts::class, - \App\Http\Middleware\TrustProxies::class, + Middleware\TrustProxies::class, \Illuminate\Http\Middleware\HandleCors::class, - \App\Http\Middleware\PreventRequestsDuringMaintenance::class, + Middleware\PreventRequestsDuringMaintenance::class, \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, - \App\Http\Middleware\TrimStrings::class, + Middleware\TrimStrings::class, \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, ]; @@ -30,11 +30,11 @@ class Kernel extends HttpKernel */ protected $middlewareGroups = [ 'web' => [ - \App\Http\Middleware\EncryptCookies::class, + Middleware\EncryptCookies::class, \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, \Illuminate\Session\Middleware\StartSession::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class, - \App\Http\Middleware\VerifyCsrfToken::class, + Middleware\VerifyCsrfToken::class, \Illuminate\Routing\Middleware\SubstituteBindings::class, ], @@ -55,15 +55,15 @@ class Kernel extends HttpKernel protected $routeMiddleware = [ 'abilities' => \Laravel\Sanctum\Http\Middleware\CheckAbilities::class, 'ability' => \Laravel\Sanctum\Http\Middleware\CheckForAnyAbility::class, - 'auth' => \App\Http\Middleware\Authenticate::class, + 'auth' => Middleware\Authenticate::class, 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, 'can' => \Illuminate\Auth\Middleware\Authorize::class, - 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, + 'guest' => Middleware\RedirectIfAuthenticated::class, 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class, 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, - 'tracksid' => \App\Http\Middleware\TracksidAuthentication::class, + 'tracksid' => Middleware\TracksidAuthentication::class, ]; } diff --git a/app/Http/Middleware/PantauMiddleware.php b/app/Http/Middleware/PantauMiddleware.php index a8baa1cd..480e2128 100644 --- a/app/Http/Middleware/PantauMiddleware.php +++ b/app/Http/Middleware/PantauMiddleware.php @@ -10,7 +10,7 @@ class PantauMiddleware /** * Handle an incoming request. * - * @param \Illuminate\Http\Request $request + * @param Request $request * @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next * @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse */ diff --git a/app/Http/Middleware/PreventRequestsDuringMaintenance.php b/app/Http/Middleware/PreventRequestsDuringMaintenance.php index 17dbcfc8..416c7004 100644 --- a/app/Http/Middleware/PreventRequestsDuringMaintenance.php +++ b/app/Http/Middleware/PreventRequestsDuringMaintenance.php @@ -12,14 +12,14 @@ class PreventRequestsDuringMaintenance /** * The application implementation. * - * @var \Illuminate\Contracts\Foundation\Application + * @var Application */ protected $app; /** * Create a new middleware instance. * - * @param \Illuminate\Contracts\Foundation\Application $app + * @param Application $app * @return void */ public function __construct(Application $app) @@ -31,10 +31,10 @@ public function __construct(Application $app) * Handle an incoming request. * * @param \Illuminate\Http\Request $request - * @param \Closure $next + * @param Closure $next * @return mixed * - * @throws \Symfony\Component\HttpKernel\Exception\HttpException + * @throws HttpException */ public function handle($request, Closure $next) { diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Http/Middleware/RedirectIfAuthenticated.php index a2813a06..a37e9144 100644 --- a/app/Http/Middleware/RedirectIfAuthenticated.php +++ b/app/Http/Middleware/RedirectIfAuthenticated.php @@ -12,7 +12,7 @@ class RedirectIfAuthenticated /** * Handle an incoming request. * - * @param \Illuminate\Http\Request $request + * @param Request $request * @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next * @param string|null ...$guards * @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse diff --git a/app/Http/Middleware/TracksidAuthentication.php b/app/Http/Middleware/TracksidAuthentication.php index e7a43431..d6b44352 100644 --- a/app/Http/Middleware/TracksidAuthentication.php +++ b/app/Http/Middleware/TracksidAuthentication.php @@ -11,8 +11,8 @@ class TracksidAuthentication /** * Handle an incoming request. * - * @param \Illuminate\Http\Request $request - * @param \Closure $next + * @param Request $request + * @param Closure $next * @return mixed */ public function handle(Request $request, Closure $next) diff --git a/app/Http/Middleware/WilayahMiddleware.php b/app/Http/Middleware/WilayahMiddleware.php index 7fa451f7..5dce932b 100644 --- a/app/Http/Middleware/WilayahMiddleware.php +++ b/app/Http/Middleware/WilayahMiddleware.php @@ -11,7 +11,7 @@ class WilayahMiddleware /** * Handle an incoming request. * - * @param \Illuminate\Http\Request $request + * @param Request $request * @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next * @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse */ diff --git a/app/Http/Requests/Auth/LoginRequest.php b/app/Http/Requests/Auth/LoginRequest.php index a539eb87..9ec61f5a 100644 --- a/app/Http/Requests/Auth/LoginRequest.php +++ b/app/Http/Requests/Auth/LoginRequest.php @@ -39,7 +39,7 @@ public function rules() * * @return void * - * @throws \Illuminate\Validation\ValidationException + * @throws ValidationException */ public function authenticate() { @@ -61,7 +61,7 @@ public function authenticate() * * @return void * - * @throws \Illuminate\Validation\ValidationException + * @throws ValidationException */ public function ensureIsNotRateLimited() { From f236970a467792685acacfd327117d70d6c6d678 Mon Sep 17 00:00:00 2001 From: ahmad afandi Date: Mon, 19 Feb 2024 07:44:33 +0700 Subject: [PATCH 19/21] perbaikan jika pengaturan waktu akhir tidak ditemukan --- app/Http/Controllers/DashboardController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/DashboardController.php b/app/Http/Controllers/DashboardController.php index 3ecec969..29796da0 100644 --- a/app/Http/Controllers/DashboardController.php +++ b/app/Http/Controllers/DashboardController.php @@ -4,6 +4,7 @@ use App\Models\Desa; use App\Models\PengaturanAplikasi; +use Carbon\Carbon; use Illuminate\Http\Request; use Yajra\DataTables\DataTables; @@ -20,7 +21,7 @@ public function __construct() public function index() { $pengaturanAplikasi = PengaturanAplikasi::get_pengaturan(); - + $pengaturanAplikasi['akhir_backup'] = !empty($pengaturanAplikasi['akhir_backup']) ? $pengaturanAplikasi['akhir_backup'] : Carbon::now()->startOfMonth()->format('Y-m-d'); return view('dashboard', [ 'jumlahDesa' => $this->desa->jumlahDesa()->get()->first(), 'desaBaru' => $this->desa->desaBaru()->count(), @@ -30,7 +31,7 @@ public function index() 'akhir_backup' => $pengaturanAplikasi['akhir_backup'], 'waktu_backup' => $pengaturanAplikasi['waktu_backup'], 'info' => 'Peringatan !!!', - 'isi' => 'Gagal Backup Otomatis ke Cloud Storage pada tanggal '.\Carbon\Carbon::createFromFormat('Y-m-d', $pengaturanAplikasi['akhir_backup'])->addDays($pengaturanAplikasi['waktu_backup'])->format('Y-m-d'), + 'isi' => 'Gagal Backup Otomatis ke Cloud Storage pada tanggal '.Carbon::createFromFormat('Y-m-d', $pengaturanAplikasi['akhir_backup'])->addDays($pengaturanAplikasi['waktu_backup'])->format('Y-m-d'), ], ]); } From a89d5936e23571b11ff15cd3e61102a5f3832a70 Mon Sep 17 00:00:00 2001 From: pandigresik Date: Mon, 19 Feb 2024 00:44:58 +0000 Subject: [PATCH 20/21] [ci skip] Fix styling --- app/Http/Controllers/DashboardController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/DashboardController.php b/app/Http/Controllers/DashboardController.php index 29796da0..05422617 100644 --- a/app/Http/Controllers/DashboardController.php +++ b/app/Http/Controllers/DashboardController.php @@ -21,7 +21,8 @@ public function __construct() public function index() { $pengaturanAplikasi = PengaturanAplikasi::get_pengaturan(); - $pengaturanAplikasi['akhir_backup'] = !empty($pengaturanAplikasi['akhir_backup']) ? $pengaturanAplikasi['akhir_backup'] : Carbon::now()->startOfMonth()->format('Y-m-d'); + $pengaturanAplikasi['akhir_backup'] = ! empty($pengaturanAplikasi['akhir_backup']) ? $pengaturanAplikasi['akhir_backup'] : Carbon::now()->startOfMonth()->format('Y-m-d'); + return view('dashboard', [ 'jumlahDesa' => $this->desa->jumlahDesa()->get()->first(), 'desaBaru' => $this->desa->desaBaru()->count(), From 518cb824e534a8410583ae0b2b40e0149987b3ce Mon Sep 17 00:00:00 2001 From: Abah Roland Date: Mon, 19 Feb 2024 15:23:14 +0700 Subject: [PATCH 21/21] [ci skip] memutahirkan catatan rilis --- catatan_rilis.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/catatan_rilis.md b/catatan_rilis.md index d5b2a29d..4007f5a4 100644 --- a/catatan_rilis.md +++ b/catatan_rilis.md @@ -9,4 +9,5 @@ Di rilis v2401.0.0 berisi perbaikan yang diminta Komunitas Open Desa. #### Penyesuaian Teknis 1. [#260](https://github.com/OpenSID/pantau/issues/260) Sesuaikan tulisan "Dashboard" menjadi "Dasbor" & text ingris lainnya pada semua tampilan dan laporan. -2. [#257](https://github.com/OpenSID/pantau/issues/257) Ubah semua perintah pada console cronjob tracksid menjadi pantau. \ No newline at end of file +2. [#257](https://github.com/OpenSID/pantau/issues/257) Ubah semua perintah pada console cronjob tracksid menjadi pantau. +3. [#256](https://github.com/OpenSID/pantau/issues/256) Pembaharuan versi laravel ke laravel 9. \ No newline at end of file