feat: app setting
This commit is contained in:
parent
298092be84
commit
fc2f5289f4
9
.gitignore
vendored
9
.gitignore
vendored
@ -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/
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use App\Settings\AppSettings;
|
||||
use Hashids\Hashids;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\File;
|
||||
|
||||
55
app/Http/Controllers/Dashboard/SettingController.php
Normal file
55
app/Http/Controllers/Dashboard/SettingController.php
Normal file
@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Dashboard;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\SettingRequest;
|
||||
use App\Settings\AppSettings;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class SettingController extends Controller
|
||||
{
|
||||
public function index(){
|
||||
return view('dashboard.setting.index', [
|
||||
'title' => '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.');
|
||||
}
|
||||
|
||||
}
|
||||
24
app/Http/Middleware/AppSettingsMiddleware.php
Normal file
24
app/Http/Middleware/AppSettingsMiddleware.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use App\Settings\AppSettings;
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\View;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
class AppSettingsMiddleware
|
||||
{
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
|
||||
*/
|
||||
public function handle(Request $request, Closure $next): Response
|
||||
{
|
||||
View::share('app', app(AppSettings::class));
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
||||
38
app/Http/Requests/SettingRequest.php
Normal file
38
app/Http/Requests/SettingRequest.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class SettingRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return Auth::check() && is_role(['1']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|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'],
|
||||
];
|
||||
}
|
||||
}
|
||||
33
app/Settings/AppSettings.php
Normal file
33
app/Settings/AppSettings.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Settings;
|
||||
|
||||
use Spatie\LaravelSettings\Settings;
|
||||
|
||||
class AppSettings extends Settings
|
||||
{
|
||||
public string $app_name;
|
||||
|
||||
public string $app_title;
|
||||
|
||||
public string $app_description;
|
||||
|
||||
public string $app_keywords;
|
||||
|
||||
public ?string $app_icon;
|
||||
|
||||
public ?string $app_logo;
|
||||
|
||||
public ?string $contact_address;
|
||||
|
||||
public ?string $contact_phone;
|
||||
|
||||
public ?string $contact_email;
|
||||
|
||||
public ?string $about_us;
|
||||
|
||||
public static function group(): string
|
||||
{
|
||||
return 'app';
|
||||
}
|
||||
}
|
||||
@ -14,6 +14,9 @@
|
||||
health: '/up',
|
||||
)
|
||||
->withMiddleware(function (Middleware $middleware) {
|
||||
$middleware->use([
|
||||
App\Http\Middleware\AppSettingsMiddleware::class,
|
||||
]);
|
||||
$middleware->alias([
|
||||
'role' => RoleMiddleware::class,
|
||||
'authenticated' => AuthenticatedMiddleware::class
|
||||
|
||||
@ -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"
|
||||
|
||||
351
composer.lock
generated
351
composer.lock
generated
@ -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",
|
||||
|
||||
94
config/settings.php
Normal file
94
config/settings.php
Normal file
@ -0,0 +1,94 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
* Each settings class used in your application must be registered, you can
|
||||
* put them (manually) here.
|
||||
*/
|
||||
'settings' => [
|
||||
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'),
|
||||
];
|
||||
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('settings', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
|
||||
$table->string('group');
|
||||
$table->string('name');
|
||||
$table->boolean('locked')->default(false);
|
||||
$table->json('payload');
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
$table->unique(['group', 'name']);
|
||||
});
|
||||
}
|
||||
};
|
||||
21
database/settings/2025_02_27_064111_app_settings.php
Normal file
21
database/settings/2025_02_27_064111_app_settings.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
use Spatie\LaravelSettings\Migrations\SettingsMigration;
|
||||
|
||||
return new class extends SettingsMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
$this->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.');
|
||||
}
|
||||
};
|
||||
@ -6,11 +6,9 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="author" content="Softnio">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="description" content="A powerful and conceptual apps base dashboard template that especially build for developers and programmers.">
|
||||
<!-- Fav Icon -->
|
||||
<link rel="shortcut icon" href="{{asset('assets/defaults/simedkom-logo-circle.png')}}">
|
||||
@include('partials.app.head')
|
||||
<!-- Page Title -->
|
||||
<title>{{$title}} - App Name</title>
|
||||
<title>{{$title}} - {{$app->app_title}}</title>
|
||||
<!-- StyleSheets -->
|
||||
<link rel="stylesheet" href="{{asset('assets/dashboard/css/dashlite.css?ver=3.0.3')}}">
|
||||
<link rel="stylesheet" href="{{asset('assets/dashboard/css/custom.css')}}">
|
||||
@ -29,9 +27,9 @@
|
||||
<div class="nk-split-content nk-block-area nk-block-area-column nk-auth-container bg-white">
|
||||
<div class="nk-block nk-block-middle nk-auth-body">
|
||||
<div class="brand-logo pb-5">
|
||||
<a href="html/index.html" class="logo-link">
|
||||
<img class="logo-light logo-img logo-img-lg" src="{{asset('assets/defaults/simedkom-logo-full.png')}}" srcset="{{asset('assets/defaults/simedkom-logo-full.png')}}" alt="logo">
|
||||
<img class="logo-dark logo-img logo-img-lg" src="{{asset('assets/defaults/simedkom-logo-full.png')}}" srcset="{{asset('assets/defaults/simedkom-logo-full.png')}}" alt="logo-dark">
|
||||
<a href="javascript:void(0);" class="logo-link">
|
||||
<img class="logo-light logo-img logo-img-lg" src="{{$app->app_logo == 'simedkom-logo-full.png' ? asset('assets/defaults/simedkom-logo-full.png') : asset('storage/uploads/settings/'. $app->app_logo)}}" srcset="{{$app->app_logo == 'simedkom-logo-full.png' ? asset('assets/defaults/simedkom-logo-full.png') : asset('storage/uploads/settings/'. $app->app_logo)}}" alt="logo">
|
||||
<img class="logo-dark logo-img logo-img-lg" src="{{$app->app_logo == 'simedkom-logo-full.png' ? asset('assets/defaults/simedkom-logo-full.png') : asset('storage/uploads/settings/'. $app->app_logo)}}" srcset="{{$app->app_logo == 'simedkom-logo-full.png' ? asset('assets/defaults/simedkom-logo-full.png') : asset('storage/uploads/settings/'. $app->app_logo)}}" alt="logo-dark">
|
||||
</a>
|
||||
</div>
|
||||
<div class="nk-block-head">
|
||||
|
||||
@ -6,11 +6,9 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="author" content="Softnio">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="description" content="A powerful and conceptual apps base dashboard template that especially build for developers and programmers.">
|
||||
<!-- Fav Icon -->
|
||||
<link rel="shortcut icon" href="./images/favicon.png">
|
||||
@include('partials.app.head')
|
||||
<!-- Page Title -->
|
||||
<title>{{$title}} - App Name</title>
|
||||
<title>{{$title}} - {{$app->app_title}}</title>
|
||||
<!-- StyleSheets -->
|
||||
<link rel="stylesheet" href="{{asset('assets/dashboard/css/dashlite.css?ver=3.0.3')}}">
|
||||
<link id="skin-default" rel="stylesheet" href="{{asset('assets/dashboard/css/theme.css?ver=3.0.3')}}">
|
||||
@ -40,7 +38,7 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-center pb-4">
|
||||
<a href="#"><img class="email-logo" src="{{asset('assets/defaults/simedkom-logo-full.png')}}" alt="logo"></a>
|
||||
<a href="javascript:void(0);"><img class="email-logo" src="{{$app->app_logo == 'simedkom-logo-full.png' ? asset('assets/defaults/simedkom-logo-full.png') : asset('storage/uploads/settings/'. $app->app_logo)}}" alt="logo"></a>
|
||||
<p class="email-title">Sistem Media Komunikasi Kabupaten Purwakarta</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -6,11 +6,9 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="author" content="Softnio">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="description" content="A powerful and conceptual apps base dashboard template that especially build for developers and programmers.">
|
||||
<!-- Fav Icon -->
|
||||
<link rel="shortcut icon" href="{{asset('assets/defaults/simedkom-logo-circle.png')}}">
|
||||
@include('partials.app.head')
|
||||
<!-- Page Title -->
|
||||
<title>Register | App Name</title>
|
||||
<title>{{$title}} - {{$app->app_title}}</title>
|
||||
<!-- StyleSheets -->
|
||||
<link rel="stylesheet" href="{{asset('assets/dashboard/css/dashlite.css?ver=3.0.3')}}">
|
||||
<link rel="stylesheet" href="{{asset('assets/dashboard/css/custom.css')}}">
|
||||
@ -29,9 +27,9 @@
|
||||
<div class="nk-split-content nk-block-area nk-block-area-column nk-auth-container bg-white w-lg-45">
|
||||
<div class="nk-block nk-block-middle nk-auth-body">
|
||||
<div class="brand-logo pb-5">
|
||||
<a href="html/index.html" class="logo-link">
|
||||
<img class="logo-light logo-img logo-img-lg" src="{{asset('assets/defaults/simedkom-logo-full.png')}}" srcset="{{asset('assets/defaults/simedkom-logo-full.png')}}" alt="logo">
|
||||
<img class="logo-dark logo-img logo-img-lg" src="{{asset('assets/defaults/simedkom-logo-full.png')}}" srcset="{{asset('assets/defaults/simedkom-logo-full.png')}}" alt="logo-dark">
|
||||
<a href="javascript:void(0);" class="logo-link">
|
||||
<img class="logo-light logo-img logo-img-lg" src="{{$app->app_logo == 'simedkom-logo-full.png' ? asset('assets/defaults/simedkom-logo-full.png') : asset('storage/uploads/settings/'. $app->app_logo)}}" srcset="{{$app->app_logo == 'simedkom-logo-full.png' ? asset('assets/defaults/simedkom-logo-full.png') : asset('storage/uploads/settings/'. $app->app_logo)}}" alt="logo">
|
||||
<img class="logo-dark logo-img logo-img-lg" src="{{$app->app_logo == 'simedkom-logo-full.png' ? asset('assets/defaults/simedkom-logo-full.png') : asset('storage/uploads/settings/'. $app->app_logo)}}" srcset="{{$app->app_logo == 'simedkom-logo-full.png' ? asset('assets/defaults/simedkom-logo-full.png') : asset('storage/uploads/settings/'. $app->app_logo)}}" alt="logo-dark">
|
||||
</a>
|
||||
</div>
|
||||
<div class="nk-block-head">
|
||||
|
||||
145
resources/views/dashboard/setting/index.blade.php
Normal file
145
resources/views/dashboard/setting/index.blade.php
Normal file
@ -0,0 +1,145 @@
|
||||
@include('partials.dashboard.head')
|
||||
@include('partials.dashboard.sidebar', ['page' => 'settings'])
|
||||
@include('partials.dashboard.header')
|
||||
<!-- content @s -->
|
||||
<div class="nk-content ">
|
||||
<div class="container-fluid">
|
||||
<div class="nk-content-inner">
|
||||
<div class="nk-content-body">
|
||||
<div class="nk-block nk-block-lg">
|
||||
<div class="card card-bordered card-preview">
|
||||
<div class="card-inner">
|
||||
<div class="card-head">
|
||||
<h5 class="card-title">{{$title}}</h5>
|
||||
</div>
|
||||
@foreach ($errors->all() as $item)
|
||||
{{$item}}
|
||||
@endforeach
|
||||
<form action="{{route('dashboard.settings.update')}}" method="post" enctype="multipart/form-data">
|
||||
@csrf
|
||||
@method('put')
|
||||
<div class="row g-4">
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="app_name">Nama Aplikasi<span class="required-input">*</span></label>
|
||||
<div class="form-control-wrap">
|
||||
<input type="text" class="form-control @error('app_name') border-danger @enderror" id="app_name" name="app_name" placeholder="Masukan nama aplikasi" value="{{$app->app_name}}">
|
||||
</div>
|
||||
@error('app_name')
|
||||
<span class="validation-error">{{$message}}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="app_title">Title Tab Aplikasi<span class="required-input">*</span></label>
|
||||
<div class="form-control-wrap">
|
||||
<input type="text" class="form-control @error('app_title') border-danger @enderror" id="app_title" name="app_title" placeholder="Masukan title untuk tab aplikasi" value="{{$app->app_title}}">
|
||||
</div>
|
||||
@error('app_title')
|
||||
<span class="validation-error">{{$message}}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="app_description">Deskripsi Aplikasi<span class="required-input">*</span></label>
|
||||
<div class="form-control-wrap">
|
||||
<input type="text" class="form-control @error('app_description') border-danger @enderror" id="app_description" name="app_description" placeholder="Masukan deskripsi aplikasi" value="{{$app->app_description}}">
|
||||
</div>
|
||||
@error('app_description')
|
||||
<span class="validation-error">{{$message}}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="app_keywords">Keyword Aplikasi<span class="required-input">*</span></label>
|
||||
<div class="form-control-wrap">
|
||||
<input type="text" class="form-control @error('app_keywords') border-danger @enderror" id="app_keywords" name="app_keywords" placeholder="Masukan kata kunci aplikasi" value="{{$app->app_keywords}}">
|
||||
</div>
|
||||
@error('app_keywords')
|
||||
<span class="validation-error">{{$message}}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="app_icon">Icon Aplikasi<span class="required-input">*</span></label>
|
||||
<div class="form-control-wrap">
|
||||
<input type="file" class="form-control @error('app_icon') border-danger @enderror" id="app_icon" name="app_icon" accept="image/*">
|
||||
</div>
|
||||
@error('app_icon')
|
||||
<span class="validation-error">{{$message}}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="app_logo">Logo Aplikasi<span class="required-input">*</span></label>
|
||||
<div class="form-control-wrap">
|
||||
<input type="file" class="form-control @error('app_logo') border-danger @enderror" id="app_logo" name="app_logo" accept="image/*">
|
||||
</div>
|
||||
@error('app_logo')
|
||||
<span class="validation-error">{{$message}}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="contact_address">Alamat<span class="required-input">*</span></label>
|
||||
<div class="form-control-wrap">
|
||||
<input type="text" class="form-control @error('contact_address') border-danger @enderror" id="contact_address" name="contact_address" placeholder="Masukan alamat" value="{{$app->contact_address}}">
|
||||
</div>
|
||||
@error('contact_address')
|
||||
<span class="validation-error">{{$message}}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="contact_phone">Nomor Telepon<span class="required-input">*</span></label>
|
||||
<div class="form-control-wrap">
|
||||
<input type="text" class="form-control @error('contact_phone') border-danger @enderror" id="contact_phone" name="contact_phone" placeholder="Masukan nomor telepon" value="{{$app->contact_phone}}">
|
||||
</div>
|
||||
@error('contact_phone')
|
||||
<span class="validation-error">{{$message}}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="contact_email">Email<span class="required-input">*</span></label>
|
||||
<div class="form-control-wrap">
|
||||
<input type="text" class="form-control @error('contact_email') border-danger @enderror" id="contact_email" name="contact_email" placeholder="Masukan email" value="{{$app->contact_email}}">
|
||||
</div>
|
||||
@error('contact_email')
|
||||
<span class="validation-error">{{$message}}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-12">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="about_us">Tentang Kami<span class="required-input">*</span></label>
|
||||
<div class="form-control-wrap">
|
||||
<textarea class="tinymce-basic form-control" name="about_us" id="about_us">{!!$app->about_us!!}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<hr>
|
||||
<div class="form-group d-flex justify-content-end">
|
||||
<button type="submit" class="btn btn-md btn-primary">Simpan</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- content @e -->
|
||||
@include('partials.dashboard.footer', ['rich_editor' => true])
|
||||
12
resources/views/partials/app/head.blade.php
Normal file
12
resources/views/partials/app/head.blade.php
Normal file
@ -0,0 +1,12 @@
|
||||
<meta name="robots" content="index, follow">
|
||||
<meta name="author" content="Hamba Allah">
|
||||
<meta name="description" content="{{$app->app_description}}">
|
||||
<meta name="keywords" content="{{$app->app_keywords}}">
|
||||
<!-- Fav Icon -->
|
||||
<link rel="shortcut icon" href="{{$app->app_icon == 'simedkom-logo-circle.png' ? asset('assets/defaults/simedkom-logo-circle.png') : asset('storage/uploads/settings/'. $app->app_icon)}}">
|
||||
<meta property="og:title" content="{{$app->app_title}}">
|
||||
<meta property="og:description" content="{{$app->app_description}}">
|
||||
<meta property="og:url" content="{{ url()->current() }}">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:title" content="{{$app->app_title}}">
|
||||
<meta name="twitter:description" content="{{$app->app_description}}">
|
||||
@ -7,11 +7,9 @@
|
||||
<meta name="author" content="Yuqi">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="description" content="A powerful and conceptual apps base dashboard template that especially build for developers and programmers.">
|
||||
<!-- Fav Icon -->
|
||||
<link rel="shortcut icon" href="{{asset('assets/defaults/simedkom-logo-circle.png')}}">
|
||||
@include('partials.app.head')
|
||||
<!-- Page Title -->
|
||||
<title>{{$title}} - App Name</title>
|
||||
<title>{{$title}} - {{$app->app_title}}</title>
|
||||
<!-- StyleSheets -->
|
||||
<link rel="stylesheet" href="{{asset('assets/dashboard/css/dashlite.css?ver=3.0.3')}}">
|
||||
<link rel="stylesheet" href="{{asset('assets/dashboard/css/custom.css')}}">
|
||||
|
||||
@ -6,10 +6,10 @@
|
||||
<div class="nk-sidebar nk-sidebar-fixed is-light " data-content="sidebarMenu">
|
||||
<div class="nk-sidebar-element nk-sidebar-head">
|
||||
<div class="nk-sidebar-brand">
|
||||
<a href="html/index.html" class="logo-link nk-sidebar-logo">
|
||||
<img class="logo-light logo-img" src="{{asset('assets/defaults/simedkom-logo-full.png')}}" srcset="{{asset('assets/defaults/simedkom-logo-full.png')}}" alt="logo">
|
||||
<img class="logo-dark logo-img" src="{{asset('assets/defaults/simedkom-logo-full.png')}}" srcset="{{asset('assets/defaults/simedkom-logo-full.png')}}" alt="logo-dark">
|
||||
<img class="logo-small logo-img logo-img-small" src="{{asset('assets/defaults/simedkom-logo-full.png')}}" srcset="{{asset('assets/defaults/simedkom-logo-full.png')}}" alt="logo-small">
|
||||
<a href="javascript:void(0);" class="logo-link nk-sidebar-logo">
|
||||
<img class="logo-light logo-img" src="{{$app->app_logo == 'simedkom-logo-full.png' ? asset('assets/defaults/simedkom-logo-full.png') : asset('storage/uploads/settings/'. $app->app_logo)}}" alt="logo">
|
||||
<img class="logo-dark logo-img" src="{{$app->app_logo == 'simedkom-logo-full.png' ? asset('assets/defaults/simedkom-logo-full.png') : asset('storage/uploads/settings/'. $app->app_logo)}}" alt="logo-dark">
|
||||
<img class="logo-small logo-img logo-img-small" src="{{$app->app_logo == 'simedkom-logo-full.png' ? asset('assets/defaults/simedkom-logo-full.png') : asset('storage/uploads/settings/'. $app->app_logo)}}" alt="logo-small">
|
||||
</a>
|
||||
</div>
|
||||
<div class="nk-menu-trigger me-n2">
|
||||
@ -85,7 +85,7 @@
|
||||
</a>
|
||||
</li><!-- .nk-menu-item -->
|
||||
<li class="nk-menu-item">
|
||||
<a href="javascript:void(0);" class="nk-menu-link">
|
||||
<a href="{{route('dashboard.settings.index')}}" class="nk-menu-link {{$page === 'settings' ? 'active-page' : ''}}">
|
||||
<span class="nk-menu-icon"><em class="icon ni ni-setting"></em></span>
|
||||
<span class="nk-menu-text">Pengaturan Aplikasi</span>
|
||||
</a>
|
||||
|
||||
@ -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');
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
4
storage/app/.gitignore
vendored
4
storage/app/.gitignore
vendored
@ -1,4 +0,0 @@
|
||||
*
|
||||
!private/
|
||||
!public/
|
||||
!.gitignore
|
||||
2
storage/app/public/.gitignore
vendored
2
storage/app/public/.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
*
|
||||
!.gitignore
|
||||
9
storage/framework/.gitignore
vendored
9
storage/framework/.gitignore
vendored
@ -1,9 +0,0 @@
|
||||
compiled.php
|
||||
config.php
|
||||
down
|
||||
events.scanned.php
|
||||
maintenance.php
|
||||
routes.php
|
||||
routes.scanned.php
|
||||
schedule-*
|
||||
services.json
|
||||
3
storage/framework/cache/.gitignore
vendored
3
storage/framework/cache/.gitignore
vendored
@ -1,3 +0,0 @@
|
||||
*
|
||||
!data/
|
||||
!.gitignore
|
||||
2
storage/framework/cache/data/.gitignore
vendored
2
storage/framework/cache/data/.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
*
|
||||
!.gitignore
|
||||
2
storage/framework/sessions/.gitignore
vendored
2
storage/framework/sessions/.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
*
|
||||
!.gitignore
|
||||
2
storage/framework/testing/.gitignore
vendored
2
storage/framework/testing/.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
*
|
||||
!.gitignore
|
||||
2
storage/framework/views/.gitignore
vendored
2
storage/framework/views/.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
*
|
||||
!.gitignore
|
||||
2
storage/logs/.gitignore
vendored
2
storage/logs/.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
*
|
||||
!.gitignore
|
||||
Loading…
Reference in New Issue
Block a user