PHPackages                             ojiepermana/laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ojiepermana/laravel

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ojiepermana/laravel
===================

Laravel utility package with blade directives, helpers, and services.

13.0.0(1mo ago)056MITPHPPHP ^8.1

Since Jul 22Pushed 1mo agoCompare

[ Source](https://github.com/ojiepermana/laravel)[ Packagist](https://packagist.org/packages/ojiepermana/laravel)[ RSS](/packages/ojiepermana-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (12)Versions (7)Used By (0)

ojiepermana/laravel
===================

[](#ojiepermanalaravel)

Paket utilitas Laravel berisi:

- Blade directive `@currency`
- Helper global `format_rupiah()`
- Helper Indonesia untuk format tanggal, angka, dan utilitas lainnya
- Service `ExcelExportService` untuk export Excel
- Service `BniBillingEncryptor` untuk enkripsi/dekripsi BNI e-Collection
- **Google Cloud Storage** — Laravel filesystem adapter untuk GCS (`Storage::disk('gcs')`)

Kompatibel dengan Laravel `10`, `11`, `12`, dan `13`.

Instalasi
---------

[](#instalasi)

```
composer require ojiepermana/laravel
```

Atau jika lokal:

```
composer config repositories.ojie path ./path/ke/folder/laravel
composer require ojiepermana/laravel:*
```

Penggunaan
----------

[](#penggunaan)

### Blade Directive

[](#blade-directive)

```
@currency(1500000)
```

Output:

```
Rp 1.500.000

```

### Helper

[](#helper)

```
format_rupiah(250000); // Rp 250.000
```

### Export Excel

[](#export-excel)

```
ExcelExportService::exportArray('laporan.xlsx', $data, $headers);
```

### Helper Indonesia

[](#helper-indonesia)

Library ini menyediakan berbagai helper untuk format tanggal, angka, dan utilitas Indonesia lainnya.

#### Format Tanggal Indonesia

[](#format-tanggal-indonesia)

```
// Format default (tanggal bulan tahun)
tanggal_indo('2026-02-07');
// Output: 07 Februari 2026

// Dengan nama hari
tanggal_indo('2026-02-07', 'mf', true);
// Output: Jumat, 07 Februari 2026

// Dengan waktu
tanggal_indo('2026-02-07 14:30:00', 'mf', false, true);
// Output: 07 Februari 2026 : 14:30

// Format bulan pendek
tanggal_indo('2026-02-07', 'mh');
// Output: 07 Feb 2026

// Menggunakan class
use OjiePermana\Laravel\Helpers\IndonesiaHelper;
IndonesiaHelper::tanggal('2026-02-07', 'mf', true, true);
```

#### Nama Bulan Indonesia

[](#nama-bulan-indonesia)

```
// Bulan penuh
bulan_indo('mf', 2); // Februari

// Bulan pendek
bulan_indo('mh', 2); // Feb
```

#### Format Mata Uang

[](#format-mata-uang)

```
// Format rupiah
format_uang(1500000);
// Output: Rp 1.500.000

// Tanpa lambang
format_uang(1500000, 'ya', false);
// Output: 1.500.000

// Sembunyikan nilai
format_uang(1500000, 'tidak');
// Output: rahasia
```

#### Angka Romawi

[](#angka-romawi)

```
angka_romawi(12); // XII
angka_romawi(2026); // MMXXVI
```

#### Terbilang

[](#terbilang)

```
terbilang(1500000);
// Output: satu juta lima ratus ribu

terbilang(2026);
// Output: dua ribu dua puluh enam
```

#### Nama Hari

[](#nama-hari)

```
nama_hari('2026-02-07'); // Jumat
nama_hari('2026-01-01'); // Kamis
```

#### Bulan dan Tahun

[](#bulan-dan-tahun)

```
bulan_tahun_indo('2026-02-07'); // Februari 2026
```

#### Perhitungan Tanggal

[](#perhitungan-tanggal)

```
// Jumlah hari antara dua tanggal
jumlah_hari('2026-02-01', '2026-02-28'); // 27

// Jumlah bulan antara dua tanggal
jumlah_bulan('2026-01-01', '2026-06-30'); // 5

// Minggu keberapa dalam bulan
minggu_ke_bulan('2026-02-07'); // pertama

// Hari terakhir bulan
hari_terakhir_bulan('2026-02-07'); // 2026-02-28

// Hari pertama minggu (Senin)
hari_pertama_minggu('2026-02-07'); // 2026-02-02

// Hari terakhir minggu (Minggu)
hari_terakhir_minggu('2026-02-07'); // 2026-02-08
```

#### Menggunakan Class Helper

[](#menggunakan-class-helper)

Semua fungsi di atas juga tersedia melalui class `IndonesiaHelper`:

```
use OjiePermana\Laravel\Helpers\IndonesiaHelper;

// Contoh penggunaan
IndonesiaHelper::tanggal('2026-02-07', 'mf', true, true);
IndonesiaHelper::uang(1500000);
IndonesiaHelper::terbilang(2026);
IndonesiaHelper::romawi(12);
IndonesiaHelper::nameday('2026-02-07');
IndonesiaHelper::jumlahHari2Tanggal('2026-02-01', '2026-02-28');
// dll.
```

### BNI e-Collection — API

[](#bni-e-collection--api)

Service untuk integrasi BNI e-Collection API (create, update, inquiry billing Virtual Account).

Konfigurasi billing dan payment sekarang disatukan di `config/bni.php`:

- Billing: `bni.billing.*`
- Payment H2H: `bni.payment.*`

```
use OjiePermana\Laravel\Facades\BNI;

BNI::create(trxId: 'INV-001', trxAmount: '150000', billingType: 'c', customerName: 'Budi');
BNI::update(trxId: 'INV-001', trxAmount: '200000', customerName: 'Budi');
BNI::show('INV-001');
```

Atau manual tanpa Facade:

```
use OjiePermana\Laravel\Bank\BNI\Billing\BniBillingClient;

$bni = new BniBillingClient(
    clientId:  env('BNI_BILLING_CLIENT_ID'),
    secretKey: env('BNI_BILLING_SECRET_KEY'),
    prefix:    env('BNI_BILLING_PREFIX'),
    url:       env('BNI_BILLING_URL'),
);
```

Contoh `.env` minimum:

```
# Billing (e-Collection)
BNI_BILLING_CLIENT_ID=001
BNI_BILLING_SECRET_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
BNI_BILLING_PREFIX=8
BNI_BILLING_URL=https://apibeta.bni-ecollection.com/

BNI_PAYMENT_OAUTH_URL=https:///api/oauth/token
BNI_PAYMENT_CLIENT_ID=your-client-id
BNI_PAYMENT_CLIENT_SECRET=your-client-secret
BNI_PAYMENT_API_KEY=your-api-key
BNI_PAYMENT_API_SECRET=your-api-secret
BNI_PAYMENT_CLIENT_NAME=your-client-name
BNI_PAYMENT_CLIENT_ID_PREFIX=IDBNI
```

Dokumentasi lengkap: [Docs/Bank/BNI/README.md](Docs/Bank/BNI/README.md)

### BNI e-Collection — Enkripsi

[](#bni-e-collection--enkripsi)

Service untuk enkripsi dan dekripsi data transaksi BNI Virtual Account secara manual.

```
use OjiePermana\Laravel\Bank\BNI\Billing\BniBillingEncryptor;

$hashed = BniBillingEncryptor::encryptPayload($data, $client_id, $secret_key);
$result = BniBillingEncryptor::decryptPayload($hashed_string, $client_id, $secret_key);
```

Dokumentasi lengkap: [Docs/Bank/BNI/README.md](Docs/Bank/BNI/README.md)

### Google Cloud Storage

[](#google-cloud-storage)

Laravel filesystem adapter untuk Google Cloud Storage. Terintegrasi penuh dengan `Storage::disk()` standar Laravel.

```
use Illuminate\Support\Facades\Storage;
use OjiePermana\Laravel\Facades\GCS;

// Upload file
GCS::putFile('uploads', $request->file('dokumen'));

// URL publik
$url = Storage::disk('gcs')->url('images/foto.jpg');

// Baca, hapus, copy, move
$data = Storage::disk('gcs')->get('documents/laporan.pdf');
Storage::disk('gcs')->delete('temp/file.txt');
Storage::disk('gcs')->copy('original.jpg', 'backup/original.jpg');

// Signed URL untuk file private
$signedUrl = Storage::disk('gcs-private')->getAdapter()->signedUrl('contracts/kontrak.pdf', 3600);
```

Konfigurasi di `config/filesystems.php`:

```
'gcs' => [
    'driver'      => 'gcs',
    'project_id'  => env('GCS_PROJECT_ID'),
    'key_file'    => env('GCS_KEY_FILE'),
    'bucket'      => env('GCS_BUCKET'),
    'path_prefix' => env('GCS_PATH_PREFIX', ''),
    'visibility'  => 'public',
],
```

Dokumentasi lengkap: [Docs/Storage/Google/README.md](Docs/Storage/Google/README.md)

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance89

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~48 days

Recently: every ~7 days

Total

6

Last Release

54d ago

Major Versions

1.2.0 → 13.0.02026-03-19

### Community

Maintainers

![](https://www.gravatar.com/avatar/fab7cf36297ed673d89cefc7d0cabdd4f12979d5d31aa45bbbde82a0296654a0?d=identicon)[ojiepermana](/maintainers/ojiepermana)

---

Top Contributors

[![ojiepermana](https://avatars.githubusercontent.com/u/4181488?v=4)](https://github.com/ojiepermana "ojiepermana (12 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ojiepermana-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/ojiepermana-laravel/health.svg)](https://phpackages.com/packages/ojiepermana-laravel)
```

###  Alternatives

[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[mrmarchone/laravel-auto-crud

Laravel Auto CRUD helps you streamline development and save time.

28711.8k2](/packages/mrmarchone-laravel-auto-crud)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

116.6k](/packages/tomshaw-electricgrid)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
