diff --git a/.gitignore b/.gitignore index dc74664..7b38643 100644 --- a/.gitignore +++ b/.gitignore @@ -3,8 +3,6 @@ /public/build /public/hot /public/storage -/storage/*.key -/storage/pail /vendor .env .env.backup @@ -22,3 +20,10 @@ yarn-error.log /.vscode /.zed *.Zone.Identifier +/storage/* +!/storage/.gitignore +!/storage/framework/ +!/storage/framework/cache/ +!/storage/framework/sessions/ +!/storage/framework/views/ +!/storage/logs/ diff --git a/app/Helpers/CustomHelper.php b/app/Helpers/CustomHelper.php index 82262ed..7c1d628 100644 --- a/app/Helpers/CustomHelper.php +++ b/app/Helpers/CustomHelper.php @@ -1,5 +1,6 @@ 'Pengaturan Aplikasi', + ]); + } + + public function update(SettingRequest $request) + { + $validatedData = $request->validated(); + $settings = app(AppSettings::class); + + $files = ['app_icon', 'app_logo']; + $validFile = []; + + foreach ($files as $file) { + if ($request->hasFile($file)) { + $savedFile = store_file($request->file($file), 'uploads/settings', 'public'); + $validFile[$file] = $savedFile['randomFileName']; + } else { + $validFile[$file] = $settings->$file; + } + } + + $settings->fill([ + 'app_name' => $validatedData['app_name'] ?? $settings->app_name, + 'app_title' => $validatedData['app_title'] ?? $settings->app_title, + 'app_description' => $validatedData['app_description'] ?? $settings->app_description, + 'app_keywords' => $validatedData['app_keywords'] ?? $settings->app_keywords, + 'app_icon' => $validFile['app_icon'] ?? $settings->app_icon, + 'app_logo' => $validFile['app_logo'] ?? $settings->app_logo, + 'contact_address' => $validatedData['contact_address'] ?? $settings->contact_address, + 'contact_phone' => $validatedData['contact_phone'] ?? $settings->contact_phone, + 'contact_email' => $validatedData['contact_email'] ?? $settings->contact_email, + 'about_us' => $validatedData['about_us'] ?? $settings->about_us, + ]); + + if ($settings->save()) { + return redirect()->back()->with('success-status', 'Berhasil mengubah informasi aplikasi.'); + } + + return redirect()->back()->with('failed-status', 'Gagal mengubah informasi aplikasi.'); + } + +} diff --git a/app/Http/Middleware/AppSettingsMiddleware.php b/app/Http/Middleware/AppSettingsMiddleware.php new file mode 100644 index 0000000..e8f05f9 --- /dev/null +++ b/app/Http/Middleware/AppSettingsMiddleware.php @@ -0,0 +1,24 @@ +|string> + */ + public function rules(): array + { + return [ + 'app_name' => ['required', 'string', 'max:255'], + 'app_title' => ['required', 'string', 'max:255'], + 'app_description' => ['required', 'string'], + 'app_keywords' => ['required'], + 'app_icon' => ['nullable', 'file', 'mimes:png,jpg,jpeg', 'max:4096'], + 'app_logo' => ['nullable', 'file', 'mimes:png,jpg,jpeg', 'max:4096'], + 'contact_address' => ['nullable'], + 'contact_phone' => ['nullable', 'regex:/^[0-9+\s-]+$/'], + 'contact_email' => ['nullable', 'email', 'max:255'], + 'about_us' => ['required', 'string'], + ]; + } +} diff --git a/app/Settings/AppSettings.php b/app/Settings/AppSettings.php new file mode 100644 index 0000000..e03523a --- /dev/null +++ b/app/Settings/AppSettings.php @@ -0,0 +1,33 @@ +withMiddleware(function (Middleware $middleware) { + $middleware->use([ + App\Http\Middleware\AppSettingsMiddleware::class, + ]); $middleware->alias([ 'role' => RoleMiddleware::class, 'authenticated' => AuthenticatedMiddleware::class diff --git a/composer.json b/composer.json index b959675..216c094 100644 --- a/composer.json +++ b/composer.json @@ -12,6 +12,7 @@ "php": "^8.2", "laravel/framework": "^11.31", "laravel/tinker": "^2.9", + "spatie/laravel-settings": "^3.4", "sqids/sqids": "^0.5.0", "vinkla/hashids": "^12.0", "yajra/laravel-datatables-oracle": "^11.1" diff --git a/composer.lock b/composer.lock index ba08001..3c2bb96 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f3ee170125eab7ff7a88cc38da21105b", + "content-hash": "8c8387d57c1c7134fe6bc7b8d17e984c", "packages": [ { "name": "brick/math", @@ -210,6 +210,51 @@ }, "time": "2024-07-08T12:26:09+00:00" }, + { + "name": "doctrine/deprecations", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/doctrine/deprecations.git", + "reference": "31610dbb31faa98e6b5447b62340826f54fbc4e9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/31610dbb31faa98e6b5447b62340826f54fbc4e9", + "reference": "31610dbb31faa98e6b5447b62340826f54fbc4e9", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9 || ^12", + "phpstan/phpstan": "1.4.10 || 2.0.3", + "phpstan/phpstan-phpunit": "^1.0 || ^2", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psr/log": "^1 || ^2 || ^3" + }, + "suggest": { + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Deprecations\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", + "homepage": "https://www.doctrine-project.org/", + "support": { + "issues": "https://github.com/doctrine/deprecations/issues", + "source": "https://github.com/doctrine/deprecations/tree/1.1.4" + }, + "time": "2024-12-07T21:18:45+00:00" + }, { "name": "doctrine/inflector", "version": "2.0.10", @@ -2647,6 +2692,117 @@ ], "time": "2024-11-21T10:39:51+00:00" }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.10.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "679e3ce485b99e84c775d28e2e96fade9a7fb50a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/679e3ce485b99e84c775d28e2e96fade9a7fb50a", + "reference": "679e3ce485b99e84c775d28e2e96fade9a7fb50a", + "shasum": "" + }, + "require": { + "doctrine/deprecations": "^1.0", + "php": "^7.3 || ^8.0", + "phpdocumentor/reflection-common": "^2.0", + "phpstan/phpdoc-parser": "^1.18|^2.0" + }, + "require-dev": { + "ext-tokenizer": "*", + "phpbench/phpbench": "^1.2", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^9.5", + "rector/rector": "^0.13.9", + "vimeo/psalm": "^4.25" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.10.0" + }, + "time": "2024-11-09T15:12:26+00:00" + }, { "name": "phpoption/phpoption", "version": "1.9.3", @@ -2722,6 +2878,53 @@ ], "time": "2024-07-20T21:41:07+00:00" }, + { + "name": "phpstan/phpdoc-parser", + "version": "2.1.0", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "9b30d6fd026b2c132b3985ce6b23bec09ab3aa68" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/9b30d6fd026b2c132b3985ce6b23bec09ab3aa68", + "reference": "9b30d6fd026b2c132b3985ce6b23bec09ab3aa68", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "doctrine/annotations": "^2.0", + "nikic/php-parser": "^5.3.0", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", + "phpunit/phpunit": "^9.6", + "symfony/process": "^5.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "PHPStan\\PhpDocParser\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPDoc parser with support for nullable, intersection and generic types", + "support": { + "issues": "https://github.com/phpstan/phpdoc-parser/issues", + "source": "https://github.com/phpstan/phpdoc-parser/tree/2.1.0" + }, + "time": "2025-02-19T13:28:12+00:00" + }, { "name": "psr/clock", "version": "1.0.0", @@ -3438,6 +3641,152 @@ ], "time": "2024-04-27T21:32:50+00:00" }, + { + "name": "spatie/laravel-settings", + "version": "3.4.2", + "source": { + "type": "git", + "url": "https://github.com/spatie/laravel-settings.git", + "reference": "f817f2eaf48fda76dcdecf4e7a1ab6ebc98984be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/laravel-settings/zipball/f817f2eaf48fda76dcdecf4e7a1ab6ebc98984be", + "reference": "f817f2eaf48fda76dcdecf4e7a1ab6ebc98984be", + "shasum": "" + }, + "require": { + "ext-json": "*", + "illuminate/database": "^11.0|^12.0", + "php": "^8.2", + "phpdocumentor/type-resolver": "^1.5", + "spatie/temporary-directory": "^1.3|^2.0" + }, + "require-dev": { + "ext-redis": "*", + "mockery/mockery": "^1.4", + "orchestra/testbench": "^9.0|^10.0", + "pestphp/pest": "^2.0|^3.0", + "pestphp/pest-plugin-laravel": "^2.0|^3.0", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "spatie/laravel-data": "^2.0.0|^4.0.0", + "spatie/pest-plugin-snapshots": "^2.0", + "spatie/phpunit-snapshot-assertions": "^4.2|^5.0", + "spatie/ray": "^1.36" + }, + "suggest": { + "spatie/data-transfer-object": "Allows for DTO casting to settings. (deprecated)" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Spatie\\LaravelSettings\\LaravelSettingsServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Spatie\\LaravelSettings\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ruben Van Assche", + "email": "ruben@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "Store your application settings", + "homepage": "https://github.com/spatie/laravel-settings", + "keywords": [ + "laravel-settings", + "spatie" + ], + "support": { + "issues": "https://github.com/spatie/laravel-settings/issues", + "source": "https://github.com/spatie/laravel-settings/tree/3.4.2" + }, + "funding": [ + { + "url": "https://spatie.be/open-source/support-us", + "type": "custom" + }, + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2025-02-14T14:40:11+00:00" + }, + { + "name": "spatie/temporary-directory", + "version": "2.3.0", + "source": { + "type": "git", + "url": "https://github.com/spatie/temporary-directory.git", + "reference": "580eddfe9a0a41a902cac6eeb8f066b42e65a32b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/temporary-directory/zipball/580eddfe9a0a41a902cac6eeb8f066b42e65a32b", + "reference": "580eddfe9a0a41a902cac6eeb8f066b42e65a32b", + "shasum": "" + }, + "require": { + "php": "^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\TemporaryDirectory\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alex Vanderbist", + "email": "alex@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "Easily create, use and destroy temporary directories", + "homepage": "https://github.com/spatie/temporary-directory", + "keywords": [ + "php", + "spatie", + "temporary-directory" + ], + "support": { + "issues": "https://github.com/spatie/temporary-directory/issues", + "source": "https://github.com/spatie/temporary-directory/tree/2.3.0" + }, + "funding": [ + { + "url": "https://spatie.be/open-source/support-us", + "type": "custom" + }, + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2025-01-13T13:04:43+00:00" + }, { "name": "sqids/sqids", "version": "0.5.0", diff --git a/config/settings.php b/config/settings.php new file mode 100644 index 0000000..8915bb0 --- /dev/null +++ b/config/settings.php @@ -0,0 +1,94 @@ + [ + App\Settings\AppSettings::class, + ], + + /* + * The path where the settings classes will be created. + */ + 'setting_class_path' => app_path('Settings'), + + /* + * In these directories settings migrations will be stored and ran when migrating. A settings + * migration created via the make:settings-migration command will be stored in the first path or + * a custom defined path when running the command. + */ + 'migrations_paths' => [ + database_path('settings'), + ], + + /* + * When no repository was set for a settings class the following repository + * will be used for loading and saving settings. + */ + 'default_repository' => 'database', + + /* + * Settings will be stored and loaded from these repositories. + */ + 'repositories' => [ + 'database' => [ + 'type' => Spatie\LaravelSettings\SettingsRepositories\DatabaseSettingsRepository::class, + 'model' => null, + 'table' => null, + 'connection' => null, + ], + 'redis' => [ + 'type' => Spatie\LaravelSettings\SettingsRepositories\RedisSettingsRepository::class, + 'connection' => null, + 'prefix' => null, + ], + ], + + /* + * The encoder and decoder will determine how settings are stored and + * retrieved in the database. By default, `json_encode` and `json_decode` + * are used. + */ + 'encoder' => null, + 'decoder' => null, + + /* + * The contents of settings classes can be cached through your application, + * settings will be stored within a provided Laravel store and can have an + * additional prefix. + */ + 'cache' => [ + 'enabled' => env('SETTINGS_CACHE_ENABLED', false), + 'store' => null, + 'prefix' => null, + 'ttl' => null, + ], + + /* + * These global casts will be automatically used whenever a property within + * your settings class isn't a default PHP type. + */ + 'global_casts' => [ + DateTimeInterface::class => Spatie\LaravelSettings\SettingsCasts\DateTimeInterfaceCast::class, + DateTimeZone::class => Spatie\LaravelSettings\SettingsCasts\DateTimeZoneCast::class, +// Spatie\DataTransferObject\DataTransferObject::class => Spatie\LaravelSettings\SettingsCasts\DtoCast::class, + Spatie\LaravelData\Data::class => Spatie\LaravelSettings\SettingsCasts\DataCast::class, + ], + + /* + * The package will look for settings in these paths and automatically + * register them. + */ + 'auto_discover_settings' => [ + app_path('Settings'), + ], + + /* + * Automatically discovered settings classes can be cached, so they don't + * need to be searched each time the application boots up. + */ + 'discovered_settings_cache_path' => base_path('bootstrap/cache'), +]; diff --git a/database/migrations/2022_12_14_083707_create_settings_table.php b/database/migrations/2022_12_14_083707_create_settings_table.php new file mode 100644 index 0000000..9b14b86 --- /dev/null +++ b/database/migrations/2022_12_14_083707_create_settings_table.php @@ -0,0 +1,24 @@ +id(); + + $table->string('group'); + $table->string('name'); + $table->boolean('locked')->default(false); + $table->json('payload'); + + $table->timestamps(); + + $table->unique(['group', 'name']); + }); + } +}; diff --git a/database/settings/2025_02_27_064111_app_settings.php b/database/settings/2025_02_27_064111_app_settings.php new file mode 100644 index 0000000..6b14e67 --- /dev/null +++ b/database/settings/2025_02_27_064111_app_settings.php @@ -0,0 +1,21 @@ +migrator->add('app.app_name', 'Sistem Media Komunikasi Kabupaten Purwakarta'); + $this->migrator->add('app.app_title', 'Simedkom Kab. Purwakarta'); + $this->migrator->add('app.app_description', 'Aplikasi Sistem Media Komunikasi Kabupaten Purwakarta'); + $this->migrator->add('app.app_keywords', 'diskominfo, simedkom, komunikasi, media'); + $this->migrator->add('app.app_icon', 'simedkom-logo-circle.png'); + $this->migrator->add('app.app_logo', 'simedkom-logo-full.png'); + $this->migrator->add('app.contact_address', 'Jl. Ganda Negara No.25, Nagri Kidul, Kec. Purwakarta, Kabupaten Purwakarta, Jawa Barat 41111'); + $this->migrator->add('app.contact_phone', '0851-7513-8912'); + $this->migrator->add('app.contact_email', 'simedkom.purwakarta@gmail.com'); + $this->migrator->add('app.about_us', 'Sistem Media Komunikasi (SIMEDKOM) merupakan sebuah aplikasi berbasis digital untuk mempermudah bidang informasi dan komunikasi publik di Diskominfo Purwakarta dalam menjalankan monitoring media di Kabupaten Purwakarta. + Aplikasi ini digunakan untuk penertiban administrasi kerjasama antara media dan pemerintah kabupaten Purwakarta yang dikoordinir oleh Diskominfo Purwakarta, juga menjadi alat filter dalam proses monitoring isu konten media terkait pemberitaan di Kabupaten Purwakarta.'); + } +}; diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index 478183b..583aa59 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -6,11 +6,9 @@ - - - + @include('partials.app.head') - {{$title}} - App Name + {{$title}} - {{$app->app_title}} @@ -29,9 +27,9 @@
diff --git a/resources/views/auth/register-success.blade.php b/resources/views/auth/register-success.blade.php index 4bb485d..9268bbb 100644 --- a/resources/views/auth/register-success.blade.php +++ b/resources/views/auth/register-success.blade.php @@ -6,11 +6,9 @@ - - - + @include('partials.app.head') - {{$title}} - App Name + {{$title}} - {{$app->app_title}} @@ -40,7 +38,7 @@ - + diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php index 63c881a..a4fb3a8 100644 --- a/resources/views/auth/register.blade.php +++ b/resources/views/auth/register.blade.php @@ -6,11 +6,9 @@ - - - + @include('partials.app.head') - Register | App Name + {{$title}} - {{$app->app_title}} @@ -29,9 +27,9 @@
diff --git a/resources/views/dashboard/setting/index.blade.php b/resources/views/dashboard/setting/index.blade.php new file mode 100644 index 0000000..db83850 --- /dev/null +++ b/resources/views/dashboard/setting/index.blade.php @@ -0,0 +1,145 @@ +@include('partials.dashboard.head') +@include('partials.dashboard.sidebar', ['page' => 'settings']) +@include('partials.dashboard.header') + +
+
+
+
+
+
+
+
+
{{$title}}
+
+ @foreach ($errors->all() as $item) + {{$item}} + @endforeach +
+ @csrf + @method('put') +
+
+
+ +
+ +
+ @error('app_name') + {{$message}} + @enderror +
+
+
+
+ +
+ +
+ @error('app_title') + {{$message}} + @enderror +
+
+
+
+ +
+ +
+ @error('app_description') + {{$message}} + @enderror +
+
+
+
+ +
+ +
+ @error('app_keywords') + {{$message}} + @enderror +
+
+
+
+ +
+ +
+ @error('app_icon') + {{$message}} + @enderror +
+
+
+
+ +
+ +
+ @error('app_logo') + {{$message}} + @enderror +
+
+
+
+ +
+ +
+ @error('contact_address') + {{$message}} + @enderror +
+
+
+
+ +
+ +
+ @error('contact_phone') + {{$message}} + @enderror +
+
+
+
+ +
+ +
+ @error('contact_email') + {{$message}} + @enderror +
+
+
+
+ +
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+ +@include('partials.dashboard.footer', ['rich_editor' => true]) diff --git a/resources/views/partials/app/head.blade.php b/resources/views/partials/app/head.blade.php new file mode 100644 index 0000000..89b94f9 --- /dev/null +++ b/resources/views/partials/app/head.blade.php @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/resources/views/partials/dashboard/head.blade.php b/resources/views/partials/dashboard/head.blade.php index 666e8e0..6bf4a77 100644 --- a/resources/views/partials/dashboard/head.blade.php +++ b/resources/views/partials/dashboard/head.blade.php @@ -7,11 +7,9 @@ - - - + @include('partials.app.head') - {{$title}} - App Name + {{$title}} - {{$app->app_title}} diff --git a/resources/views/partials/dashboard/sidebar.blade.php b/resources/views/partials/dashboard/sidebar.blade.php index a4a5fa5..000768a 100644 --- a/resources/views/partials/dashboard/sidebar.blade.php +++ b/resources/views/partials/dashboard/sidebar.blade.php @@ -6,10 +6,10 @@
@@ -85,7 +85,7 @@
  • - + Pengaturan Aplikasi diff --git a/routes/web.php b/routes/web.php index cceef5d..3dab79b 100644 --- a/routes/web.php +++ b/routes/web.php @@ -6,6 +6,7 @@ use App\Http\Controllers\Dashboard\GovernmentAgencyController; use App\Http\Controllers\Dashboard\NewsController; use App\Http\Controllers\Dashboard\OverviewController; +use App\Http\Controllers\Dashboard\SettingController; use App\Http\Controllers\Dashboard\SubClassificationController; use Illuminate\Support\Facades\Route; @@ -88,5 +89,12 @@ Route::get('/data', [DatatableController::class, 'news'])->name('data'); }); + + Route::prefix('settings')->name('settings.')->group(function(){ + Route::controller(SettingController::class)->group(function(){ + Route::get('/', 'index')->name('index'); + Route::put('/', 'update')->name('update'); + }); + }); }); }); diff --git a/storage/app/private/.gitignore b/storage/.gitignore similarity index 100% rename from storage/app/private/.gitignore rename to storage/.gitignore diff --git a/storage/app/.gitignore b/storage/app/.gitignore deleted file mode 100644 index fedb287..0000000 --- a/storage/app/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -* -!private/ -!public/ -!.gitignore diff --git a/storage/app/public/.gitignore b/storage/app/public/.gitignore deleted file mode 100644 index d6b7ef3..0000000 --- a/storage/app/public/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/storage/framework/.gitignore b/storage/framework/.gitignore deleted file mode 100644 index 05c4471..0000000 --- a/storage/framework/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -compiled.php -config.php -down -events.scanned.php -maintenance.php -routes.php -routes.scanned.php -schedule-* -services.json diff --git a/storage/framework/cache/.gitignore b/storage/framework/cache/.gitignore deleted file mode 100644 index 01e4a6c..0000000 --- a/storage/framework/cache/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -* -!data/ -!.gitignore diff --git a/storage/framework/cache/data/.gitignore b/storage/framework/cache/data/.gitignore deleted file mode 100644 index d6b7ef3..0000000 --- a/storage/framework/cache/data/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/storage/framework/sessions/.gitignore b/storage/framework/sessions/.gitignore deleted file mode 100644 index d6b7ef3..0000000 --- a/storage/framework/sessions/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/storage/framework/testing/.gitignore b/storage/framework/testing/.gitignore deleted file mode 100644 index d6b7ef3..0000000 --- a/storage/framework/testing/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/storage/framework/views/.gitignore b/storage/framework/views/.gitignore deleted file mode 100644 index d6b7ef3..0000000 --- a/storage/framework/views/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/storage/logs/.gitignore b/storage/logs/.gitignore deleted file mode 100644 index d6b7ef3..0000000 --- a/storage/logs/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore