PHPackages                             gani/laravel-exam-boots - 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. [Framework](/categories/framework)
4. /
5. gani/laravel-exam-boots

ActiveLibrary[Framework](/categories/framework)

gani/laravel-exam-boots
=======================

Speedrunner package for programming certification exam

v1.2.5(1mo ago)07↑2042.9%MITPHPPHP ^8.3

Since Jul 15Pushed 1mo agoCompare

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

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

   ![Laravel Exam Boots](https://camo.githubusercontent.com/add54281c9fb74f167b2c1f1e13468346d6ef8885dc90eb7036e09b579462947/68747470733a2f2f6c61726176656c2e636f6d2f696d672f6c6f676f6d61726b2e6d696e2e737667)

Laravel Exam Boots
==================

[](#laravel-exam-boots)

 **CLI Component &amp; Auth Generator — Shadcn-style boilerplate ejector untuk ujian sertifikasi Laravel**

 [![Packagist](https://camo.githubusercontent.com/8870f627b8b1038ff4650efcd7e33609a6802620e511a9a93fc1380ac95dd467/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6672616e6b656e2f6c61726176656c2d6578616d2d626f6f74733f6c6162656c3d76657273696f6e266c6f676f3d7061636b6167697374266c6f676f436f6c6f723d776869746526636f6c6f723d464632443230)](https://packagist.org/packages/franken/laravel-exam-boots) [![Downloads](https://camo.githubusercontent.com/b637c9a6c375536f1bbeec0aada5057ad72dadf9882d3ccb7e5196e6f71ae2f5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6672616e6b656e2f6c61726176656c2d6578616d2d626f6f74733f6c6f676f3d7061636b6167697374266c6f676f436f6c6f723d776869746526636f6c6f723d464632443230)](https://packagist.org/packages/franken/laravel-exam-boots) [![PHP](https://camo.githubusercontent.com/31a87e1f22b529af58a2615dde6bcd4902061209db5e98adc4b5dff3e99f5f02/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e332d3737374242343f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/31a87e1f22b529af58a2615dde6bcd4902061209db5e98adc4b5dff3e99f5f02/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e332d3737374242343f6c6f676f3d706870266c6f676f436f6c6f723d7768697465) [![Laravel](https://camo.githubusercontent.com/0870c5ff942e653d1e6d47ef608c04fab265bc9f0d35077e2e75a3e735b302c4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d25354531332e782d4646324432303f6c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/0870c5ff942e653d1e6d47ef608c04fab265bc9f0d35077e2e75a3e735b302c4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d25354531332e782d4646324432303f6c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465) [![License](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)

 [Fitur](#-fitur-utama) • [Quick Start](#-quick-start) • [Commands](#-referensi-command-cli) • [Arsitektur](#-arsitektur) • [Contoh Kode](#-contoh-kode) • [Dokumentasi HTML](https://franken.github.io/laravel-exam-boots)

---

> Hemat hingga **90% waktu setup** dengan boilerplate arsitektur modern yang langsung di-*eject* ke `app/` dan `database/`. Bukan library blackbox — kamu dapatkan kode utuh yang bisa langsung diedit.

---

Demo
----

[](#demo)

```
# One-shot setup: environment check + auth + seeder + migrate
php artisan forge:install

# Buat CRUD Product dalam  yes

Pilih tipe database operation:
> Eloquent CRUD

```

Hasil: **6 file siap pakai** — tinggal `php artisan migrate` dan daftarkan route.

### 4. Setup Manual (Step-by-Step)

[](#4-setup-manual-step-by-step)

```
# 1. Cek environment
php artisan forge:doctor

# 2. Setup auth
php artisan forge:auth

# 3. Buat CRUD
php artisan forge:add Product

# 4. Seeder admin
php artisan forge:seed-admin

# 5. Migrate database
php artisan migrate
```

---

Referensi Command CLI
---------------------

[](#referensi-command-cli)

### Command 1: `php artisan forge:install`

[](#command-1-php-artisan-forgeinstall)

**One-shot installer** — menjalankan 4 langkah setup dalam satu perintah.

```
# Setup lengkap
php artisan forge:install

# Preview tanpa eksekusi
php artisan forge:install --dry-run

# Lewati semua konfirmasi
php artisan forge:install --force
```

Output:

```
Laravel Exam Boots — One-Shot Installer
 1. Verifikasi environment (forge:doctor)
 2. Setup autentikasi (forge:auth)
 3. Buat seeder admin (forge:seed-admin)
 4. Jalankan migrasi database

┌──────────────┬──────────────────────────────────────┐
│ Step         │ Status                               │
├──────────────┼──────────────────────────────────────┤
│ Environment  │ Passed (11/11 checks OK)           │
│ Auth         │ JWT + Scramble installed           │
│ Admin Seeder │ AdminUserSeeder created            │
│ Migrate      │ All migrations applied             │
└──────────────┴──────────────────────────────────────┘

```

---

### Command 2: `php artisan forge:add {name}`

[](#command-2-php-artisan-forgeadd-name)

Generate **6 file CRUD** sekaligus. Nama komponen otomatis dikonversi ke PascalCase untuk kelas, camelCase untuk variabel, dan snake\_case untuk tabel.

#### Flags

[](#flags)

FlagContohFungsi`--belongsTo``--belongsTo=Category`Relasi belongsTo + FK di migration`--hasMany``--hasMany=Review`Relasi hasMany + belongsTo di model anak`--hasOne``--hasOne=Profile`Relasi hasOne 1-to-1`--belongsToMany``--belongsToMany=Role`Many-to-many + pivot table`--with-factory``--with-factory`Factory + Seeder`--upload``--upload=image`Handler upload file + validasi`--web``--web`Blade views + web routing`--enum``--enum=status:active,inactive`Enum class + casts + migration`--soft-deletes``--soft-deletes`SoftDeletes trait + kolom deleted\_at#### Contoh Penggunaan

[](#contoh-penggunaan)

```
# Basic CRUD
php artisan forge:add Product

# CRUD dengan relasi kategori, upload gambar, soft deletes
php artisan forge:add Product \
  --belongsTo=Category \
  --upload=image \
  --soft-deletes

# CRUD dengan factory, enum status, dan blade views
php artisan forge:add Order \
  --with-factory \
  --enum=status:pending,processing,completed \
  --web

# CRUD many-to-many dengan roles
php artisan forge:add User \
  --belongsToMany=Role \
  --with-factory
```

---

### Command 3: `php artisan forge:auth`

[](#command-3-php-artisan-forgeauth)

Setup autentikasi API lengkap dengan pilihan **JWT** atau **Laravel Sanctum**.

```
# Setup interaktif
php artisan forge:auth

# Paksa metode tertentu
php artisan forge:auth --method=jwt
php artisan forge:auth --method=sanctum
```

Yang akan dihasilkan (menggunakan standar arsitektur **Model-Service-Controller (MSC)**):

- **Service Layer** — `app/Services/AuthService.php` yang menangani register, login, logout, dan token refresh.
- **Form Requests** — `app/Http/Requests/Auth/LoginRequest.php` &amp; `app/Http/Requests/Auth/RegisterRequest.php` untuk validasi.
- **API Resource** — `app/Http/Resources/UserResource.php` sebagai wrapper serialize response user yang bersih.
- **Controller** — `app/Http/Controllers/Api/AuthController.php` (atau `AuthController.php` di mode non-API) yang menyuntikkan `AuthService`.
- **User Model** — Model `User` terkonfigurasi otomatis dengan trait auth (JWT/Sanctum).
- **Route Auth** — Auto-append ke `routes/api.php` (atau `routes/web.php` di mode non-API).
- **API Scaffolding &amp; Config** — Setup config JWT/Sanctum secara terotomatisasi.
- **Scramble API docs** (opsional) — Dokumentasi API dinamis langsung aktif.

---

### Command 4: `php artisan forge:relation`

[](#command-4-php-artisan-forgerelation)

Membangun relasi Eloquent antar model secara interaktif.

```
php artisan forge:relation
```

- Inject method relasi ke kedua model
- Generate migration FK atau pivot table
- Dukungan: `hasOne`, `hasMany`, `belongsToMany`

---

### Command 5: `php artisan forge:policy {Model}`

[](#command-5-php-artisan-forgepolicy-model)

```
php artisan forge:policy Post
```

- Membuat `app/Policies/PostPolicy.php`
- Auto-register di `AuthServiceProvider.php`

---

### Command 6: `php artisan forge:test {Model}`

[](#command-6-php-artisan-forgetest-model)

```
# PHPUnit
php artisan forge:test Product

# Pest PHP
php artisan forge:test Product --pest
```

Test yang dihasilkan mencakup: Read, Create, Detail, Update, Delete, Auth Protection.

---

### Command 7: `php artisan forge:export {Model}`

[](#command-7-php-artisan-forgeexport-model)

```
php artisan forge:export Product
```

- `App/Exports/ProductExport.php` — Excel (maatwebsite/excel)
- `App/Exports/ProductPdfExport.php` — PDF (barryvdh/laravel-dompdf)
- `resources/views/exports/product-pdf.blade.php` — Template PDF

---

### Command 8: `php artisan forge:response`

[](#command-8-php-artisan-forgeresponse)

```
php artisan forge:response
```

Menghasilkan `app/Traits/ApiResponse.php` dengan helper:

- `success($data, $message, $code)` — Response sukses terstandarisasi
- `error($message, $code)` — Response error konsisten

---

### Command 9: `php artisan forge:doctor`

[](#command-9-php-artisan-forgedoctor)

Cek environment sebelum ujian:

- PHP version (&gt;= 8.3)
- Laravel structure
- Database connection
- APP\_KEY &amp; APP\_DEBUG
- JWT secret (jika JWT terinstall)
- Storage symlink
- Pending migrations
- Route files
- **Backup retention** — peringatan jika backup terlalu tua

```
php artisan forge:doctor
```

---

### Command 10: `php artisan forge:seed-admin`

[](#command-10-php-artisan-forgeseed-admin)

```
# Default (admin@example.com / password)
php artisan forge:seed-admin

# Custom
php artisan forge:seed-admin --email=admin@test.com --password=rahasia123
```

---

### Command 11: `php artisan forge:cheatsheet`

[](#command-11-php-artisan-forgecheatsheet)

Tampilkan daftar command offline:

```
php artisan forge:cheatsheet
```

---

### Command 12: `php artisan forge:undo {id?} --prune`

[](#command-12-php-artisan-forgeundo-id---prune)

Rollback operasi generator terakhir.

```
# Undo operasi terakhir
php artisan forge:undo

# Undo operasi spesifik (lihat ID dari history)
php artisan forge:undo abc123

# Undo + bersihkan backup expired
php artisan forge:undo --prune
```

Fitur:

- Restore file yang dimodifikasi ke versi asli
- Hapus file baru yang digenerate
- Backup otomatis sebelum modifikasi
- Riwayat operasi tersimpan di `storage/exam-boots/history.json`
- **Retensi backup**: 3 hari (konfigurabel via `config/exam-boots.php`)

---

Contoh Kode yang Dihasilkan
---------------------------

[](#contoh-kode-yang-dihasilkan)

### Service Class

[](#service-class)

```
readonly class ProductService
{
    public function getAllProduct(array $filters = []): LengthAwarePaginator
    {
        $query = Product::query();

        // Filter by exact field: ?filter[status]=active
        if (! empty($filters['filter'])) {
            foreach ($filters['filter'] as $field => $value) {
                $query->where($field, $value);
            }
        }

        // Search: ?search=keyword
        if (! empty($filters['search'])) {
            $query->where(function ($q) use ($filters) {
                $q->where('name', 'LIKE', "%{$filters['search']}%");
            });
        }

        // Sort: ?sort_by=created_at&sort_order=desc
        $sortBy = $filters['sort_by'] ?? 'created_at';
        $sortOrder = $filters['sort_order'] ?? 'desc';
        $query->orderBy($sortBy, $sortOrder);

        // Paginate: ?per_page=15
        return $query->paginate((int) ($filters['per_page'] ?? 15));
    }

    public function getDetailProduct(int $id): Product
    {
        return Product::findOrFail($id);
    }

    public function createProduct(array $data): Product
    {
        return Product::create($data);
    }

    public function updateProduct(int $id, array $data): Product
    {
        $product = Product::findOrFail($id);
        $product->update($data);
        return $product;
    }

    public function deleteProduct($id): bool
    {
        return Product::findOrFail($id)->delete();
    }
}
```

### Controller dengan Dependency Injection

[](#controller-dengan-dependency-injection)

```
class ProductController extends Controller
{
    public function __construct(
        private readonly ProductService $productService,
    ) {
        $this->middleware('auth:sanctum');
    }

    public function index(Request $request): JsonResponse
    {
        $products = $this->productService->getAllProduct($request->all());

        return response()->json([
            'status' => 'success',
            'data' => ProductResource::collection($products),
            'meta' => [
                'current_page' => $products->currentPage(),
                'last_page' => $products->lastPage(),
                'per_page' => $products->perPage(),
                'total' => $products->total(),
            ],
        ]);
    }
}
```

### Form Request dengan Validation Rules

[](#form-request-dengan-validation-rules)

```
class ProductRequest extends FormRequest
{
    public function rules(): array
    {
        return [
            'name' => ['required', 'string', 'max:255'],
            'category_id' => ['required', 'exists:categories,id'],
            'image' => ['nullable', 'image', 'mimes:jpg,jpeg,png,webp', 'max:2048'],
            'status' => ['required', Rule::enum(Status::class)],
        ];
    }
}
```

---

Arsitektur
----------

[](#arsitektur)

```
laravel-exam-boots/
├── src/
│   ├── Concerns/
│   │   └── TracksFileOperations.php    # Trait: tracking, backup, dry-run, rollback
│   ├── Console/
│   │   ├── ExamAddCommand.php           # Generator CRUD utama
│   │   ├── ExamAuthCommand.php          # Setup autentikasi
│   │   ├── ExamCheatsheetCommand.php    # CLI cheatsheet offline
│   │   ├── ExamDoctorCommand.php        # Environment check + backup audit
│   │   ├── ExamExportCommand.php        # Excel & PDF export
│   │   ├── ExamInstallCommand.php       # One-shot installer
│   │   ├── ExamPolicyCommand.php        # Policy generator
│   │   ├── ExamRelationCommand.php      # Relasi Eloquent generator
│   │   ├── ExamResponseCommand.php      # API Response trait
│   │   ├── ExamSeedAdminCommand.php     # Admin seeder generator
│   │   ├── ExamTestCommand.php          # Test generator (PHPUnit/Pest)
│   │   └── ExamUndoCommand.php          # Rollback + backup prune
│   ├── config/
│   │   └── exam-boots.php               # Konfigurasi package
│   ├── stubs/
│   │   ├── controller.stub              # Eloquent CRUD Controller
│   │   ├── controller.blank.stub        # Blank Controller
│   │   ├── service.stub                 # Eloquent CRUD Service
│   │   ├── service.blank.stub           # Blank Service
│   │   ├── request.stub                 # Form Request
│   │   ├── resource.stub                # API Resource
│   │   ├── model.stub                   # Eloquent Model
│   │   ├── migration.stub               # Migration database
│   │   ├── web-controller.stub          # Web MVC Controller
│   │   ├── view-*.stub                  # Blade views (index, create, edit, show)
│   │   ├── factory.stub / seeder.stub   # Factory & Seeder
│   │   ├── policy.stub                  # Policy class
│   │   ├── test-*.stub                  # PHPUnit & Pest test
│   │   ├── export-*.stub                # Excel & PDF export
│   │   ├── auth-*.stub                  # Auth (JWT & Sanctum variants)
│   │   ├── api-response-trait.stub      # API Response helper
│   │   └── scramble-provider.*.stub     # Scramble providers
│   └── ForgeStarterServiceProvider.php   # Service Provider & command registration
├── docs/
│   └── index.html                       # Dokumentasi HTML interaktif
├── composer.json
└── README.md

```

### Pola Arsitektur

[](#pola-arsitektur)

```
[Request] → [Controller] → [Service] → [Model]
                ↓                          ↓
          [Form Request]            [API Resource]
          (Validasi)               (Transformasi)

```

Setiap komponen dipisahkan dengan tanggung jawab yang jelas:

- **Controller**: Handling HTTP request/response, middleware
- **Service**: Business logic, query database
- **Form Request**: Validasi input
- **API Resource**: Transformasi data response

---

Kustomisasi
-----------

[](#kustomisasi)

Publikasikan konfigurasi untuk mengubah default:

```
php artisan vendor:publish --tag=exam-boots-config
```

File konfigurasi (`config/exam-boots.php`):

```
'defaults' => [
    'auth_method' => env('EXAM_BOOTS_AUTH', 'jwt'),   // 'jwt' atau 'sanctum'
    'test_framework' => 'pest',                        // 'pest' atau 'phpunit'
    'install_docs' => true,                            // Install Scramble docs
    'crud_type' => 'eloquent',                         // 'eloquent' atau 'blank'
],

'backup' => [
    'enabled' => true,
    'retention_days' => 3,      // Backup otomatis dibersihkan setelah 3 hari
],
```

---

Langkah Selanjutnya Setelah Generate
------------------------------------

[](#langkah-selanjutnya-setelah-generate)

### 1. Daftarkan Route

[](#1-daftarkan-route)

Buka `routes/api.php`:

```
use App\Http\Controllers\Api\ProductController;

Route::apiResource('products', ProductController::class);
```

### 2. Jalankan Migration

[](#2-jalankan-migration)

```
php artisan migrate
```

### 3. Uji Endpoint

[](#3-uji-endpoint)

**Auth:**

```
# Register
curl -X POST http://localhost:8000/api/auth/register \
  -H "Content-Type: application/json" \
  -d '{"name":"User","email":"user@test.com","password":"secret","password_confirmation":"secret"}'

# Login
curl -X POST http://localhost:8000/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email":"admin@example.com","password":"password"}'
```

**CRUD (dengan token dari login):**

```
export TOKEN="your_token_here"

curl -H "Authorization: Bearer $TOKEN" \
  http://localhost:8000/api/products

curl -X POST http://localhost:8000/api/products \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"Produk Baru","category_id":1}'
```

### 4. Buka API Docs (jika Scramble terinstall)

[](#4-buka-api-docs-jika-scramble-terinstall)

```
http://localhost:8000/docs/api

```

---

FAQ
---

[](#faq)

### Class JWTSubject tidak ditemukan?

[](#class-jwtsubject-tidak-ditemukan)

Jalankan ulang `composer install` atau `composer update` untuk refresh autoload.

### Reset JWT secret?

[](#reset-jwt-secret)

```
php artisan jwt:secret --force
```

### Ingin preview tanpa menulis file?

[](#ingin-preview-tanpa-menulis-file)

Semua command support `--dry-run`:

```
php artisan forge:add Product --dry-run
php artisan forge:install --dry-run
php artisan forge:auth --dry-run
```

### Backup menumpuk?

[](#backup-menumpuk)

Gunakan `--prune` untuk membersihkan backup yang sudah kedaluwarsa (retensi: 3 hari):

```
php artisan forge:undo --prune
```

Cek status backup via:

```
php artisan forge:doctor
```

---

Kontribusi
----------

[](#kontribusi)

Kontribusi sangat diterima! Silakan buka issue atau pull request di [GitHub](https://github.com/franken/laravel-exam-boots).

---

Lisensi
-------

[](#lisensi)

MIT License — lihat file [LICENSE](LICENSE) untuk detail.

---

Author
------

[](#author)

**Franken**

---

 **Boots Up, Code Fast, Pass The Exam!**
 Dibuat dengan dedikasi untuk mempermudah ujian sertifikasi programming

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance91

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity53

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 ~0 days

Total

6

Last Release

45d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/212493214?v=4)[Frankenstein401](/maintainers/Frankenstein401)[@Frankenstein401](https://github.com/Frankenstein401)

---

Top Contributors

[![Frankenstein401](https://avatars.githubusercontent.com/u/212493214?v=4)](https://github.com/Frankenstein401 "Frankenstein401 (19 commits)")

---

Tags

frameworklaravel

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/gani-laravel-exam-boots/health.svg)

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

###  Alternatives

[bagisto/bagisto

Bagisto Laravel E-Commerce

28.0k177.2k9](/packages/bagisto-bagisto)[unopim/unopim

UnoPim Laravel PIM

10.8k2.5k](/packages/unopim-unopim)[nasirkhan/laravel-starter

A CMS like modular Laravel starter project.

1.4k2.7k](/packages/nasirkhan-laravel-starter)[statamic/statamic

Statamic

830185.7k](/packages/statamic-statamic)[codewithdennis/larament

Larament is a time-saving starter kit to quickly launch Laravel 13.x projects. It includes FilamentPHP 5.x pre-installed and configured, along with additional tools and features to streamline your development workflow.

4041.8k](/packages/codewithdennis-larament)[ercogx/laravel-filament-starter-kit

This is a Filament v5 Starter Kit for Laravel 13, designed to accelerate the development of Filament-powered applications.

471.8k](/packages/ercogx-laravel-filament-starter-kit)

PHPackages © 2026

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