Skip to content

Commit

Permalink
Rilis v2412.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
vickyrolanda committed Dec 11, 2024
1 parent c8438af commit 042471c
Show file tree
Hide file tree
Showing 130 changed files with 2,846 additions and 704 deletions.
513 changes: 513 additions & 0 deletions app/Console/Commands/ModuleCommand.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/Console/Kernel.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/Models/Cdesa.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/Models/GrupAkses.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/Models/Penduduk.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/Models/Persil.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/Models/Shortcut.php

Large diffs are not rendered by default.

41 changes: 40 additions & 1 deletion app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@

namespace App\Providers;

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\File;
use Illuminate\Support\ServiceProvider;
use Illuminate\Database\Schema\Blueprint;

class AppServiceProvider extends ServiceProvider
{
Expand All @@ -49,6 +50,7 @@ class AppServiceProvider extends ServiceProvider
*/
public function register()
{
$this->loadModuleServiceProvider();
}

/**
Expand All @@ -65,6 +67,11 @@ public function boot()
}
}

/**
* Register macro for userstamps columns.
*
* @return void
*/
protected function registerMacrosUserStamps()
{
Blueprint::macro('timesWithUserstamps', function () {
Expand All @@ -75,6 +82,11 @@ protected function registerMacrosUserStamps()
});
}

/**
* Register macro for config_id column.
*
* @return void
*/
protected function registerMacrosConfigId()
{
Blueprint::macro('configId', function () {
Expand All @@ -83,6 +95,11 @@ protected function registerMacrosConfigId()
});
}

/**
* Log query to file.
*
* @return void
*/
private function logQuery()
{
\Illuminate\Support\Facades\DB::listen(static function (\Illuminate\Database\Events\QueryExecuted $query) {
Expand All @@ -92,4 +109,26 @@ private function logQuery()
);
});
}

/**
* Load service providers from modules.
*
* @return void
*/
private function loadModuleServiceProvider()
{
$modulesPath = $this->app->basePath('Modules');

$modules = File::directories($modulesPath);

foreach ($modules as $modulePath) {
$moduleName = basename($modulePath);

$providerClass = "Modules\\{$moduleName}\\Providers\\{$moduleName}ServiceProvider";

if (class_exists($providerClass)) {
$this->app->register($providerClass);
}
}
}
}
2 changes: 1 addition & 1 deletion app/Services/Pelanggan.php

Large diffs are not rendered by default.

Loading

0 comments on commit 042471c

Please sign in to comment.