2. Sub-Generator Commands
These commands are called by themake:module-crud orchestrator but can also be used individually for more granular control.
make:inertia-crud
Generates the core backend files (Controller, Model) and the Index.vue page for listing data.
Signature:
name: The name of the entity (e.g.,Product).--ns: PHP Namespace for the Controller and Model (e.g.,Dms\Reports).--js-page-namespace: (Optional) JS Namespace for the Pages directory structure (e.g.,Dms/Reports). If empty, it’s derived from--ns.--modelPath,--controllerPath,--pagePath: (Optional) Override default subdirectory paths.--tableYaml: (Optional) Path to a YAML file defining table columns. If provided,make:table-columnsis called to generatecolumns.tsfor theIndex.vuepage.--authenticatable: (Flag) Generates a Model that extendsAuthenticatablefor user-like entities.--softDeletes: (Flag) Adds theSoftDeletestrait to the generated Model.
app/Http/Controllers/[Ns]/[ControllerPath]/[Name]Controller.phpapp/Models/[Ns]/[ModelPath]/[Name].phpresources/js/Pages/[JsPageNs]/[Name]/Index.vueresources/js/Pages/[JsPageNs]/[Name]/data/columns.ts(if--tableYamlis used)
make:vue-form
Generates a reusable Vue form component and the Create.vue and Edit.vue Inertia pages that use it.
Signature:
yamlFile: Path to the YAML file defining the form fields and layout.--formName: The PascalCase name for the generated Vue form component (e.g.,ProductMainForm).--ns: JS Namespace for the Pages and components (e.g.,Inventory/Catalog).--page: (Flag) If included, generatesCreate.vueandEdit.vuepages.--with-layout: (Flag) Processes the YAML as a two-level structure (sections with child elements) instead of a flat list of form elements.
--page):
resources/js/Pages/[Ns]/[Entity]/components/forms/[FormName].vueresources/js/Pages/[Ns]/[Entity]/Create.vueresources/js/Pages/[Ns]/[Entity]/Edit.vue
make:vue-dataview
Generates a reusable Vue component for displaying data and the View.vue Inertia page.
Signature:
yamlFile: Path to the YAML file defining the data view sections and elements.--componentName: The PascalCase name for the generated Vue data view component (e.g.,ProductDetailView).--ns: JS Namespace for the Pages and components.--page: (Flag) If included, generates theView.vuepage.
--page):
resources/js/Pages/[Ns]/[Entity]/components/views/[ComponentName].vueresources/js/Pages/[Ns]/[Entity]/View.vue
make:table-columns
Generates a columns.ts file with TanStack Table column definitions.
Signature:
yamlFile: Path to the YAML file with atable:key defining the columns.--T: The TypeScript type for the row data (e.g.,Product). This will be used forColumnDef<Product>.--outputFile: The full path for the outputcolumns.tsfile.--actionsComponent,--headerComponent: (Optional) Specify names of custom Vue components for rendering row actions and sortable column headers.
- The file specified by
--outputFile.
make:zod-schema
Generates a schema.ts file with a Zod schema and its inferred TypeScript type.
Signature:
yamlFile: Path to the YAML file defining the data fields.schemaName: The name for the exported Zod schema variable (e.g.,productSchema).typeName: The name for the exported TypeScript type (e.g.,Product).--yamlKey: The top-level key in the YAML file that contains the field list (defaults tovue).--outputFile: The full path for the outputschema.tsfile.
- The file specified by
--outputFile.
2. Perintah Sub-Generator (Bahasa Indonesia)
Perintah-perintah ini dipanggil olehmake:module-crud tetapi juga dapat digunakan secara individual untuk kontrol yang lebih terperinci.
make:inertia-crud
Menghasilkan file backend inti (Controller, Model) dan halaman Index.vue untuk menampilkan daftar data.
Struktur Perintah:
name: Nama entitas (contoh:Product).--ns: Namespace PHP untuk Controller dan Model (contoh:Dms\Reports).--js-page-namespace: (Opsional) Namespace JS untuk struktur direktori Pages (contoh:Dms/Reports). Jika kosong, akan diturunkan dari--ns.--modelPath,--controllerPath,--pagePath: (Opsional) Mengganti path subdirektori default.--tableYaml: (Opsional) Path ke file YAML yang mendefinisikan kolom tabel. Jika diberikan,make:table-columnsakan dipanggil untuk menghasilkancolumns.tsuntuk halamanIndex.vue.--authenticatable: (Flag) Menghasilkan Model yang meng-extendAuthenticatableuntuk entitas seperti User.--softDeletes: (Flag) Menambahkan traitSoftDeleteske Model yang dihasilkan.
app/Http/Controllers/[Ns]/[ControllerPath]/[Name]Controller.phpapp/Models/[Ns]/[ModelPath]/[Name].phpresources/js/Pages/[JsPageNs]/[Name]/Index.vueresources/js/Pages/[JsPageNs]/[Name]/data/columns.ts(jika--tableYamldigunakan)
make:vue-form
Menghasilkan komponen form Vue yang dapat digunakan kembali serta halaman Inertia Create.vue dan Edit.vue yang menggunakannya.
Struktur Perintah:
yamlFile: Path ke file YAML yang mendefinisikan field dan layout form.--formName: Nama dalam format PascalCase untuk komponen form Vue yang dihasilkan (contoh:ProductMainForm).--ns: Namespace JS untuk Pages dan komponen (contoh:Inventory/Catalog).--page: (Flag) Jika disertakan, akan menghasilkan halamanCreate.vuedanEdit.vue.--with-layout: (Flag) Memproses YAML sebagai struktur dua tingkat (section dengan elemen anak) alih-alih daftar field yang datar.
--page):
resources/js/Pages/[Ns]/[Entity]/components/forms/[FormName].vueresources/js/Pages/[Ns]/[Entity]/Create.vueresources/js/Pages/[Ns]/[Entity]/Edit.vue
make:vue-dataview
Menghasilkan komponen Vue untuk menampilkan data dan halaman Inertia View.vue.
Struktur Perintah:
yamlFile: Path ke file YAML yang mendefinisikan section dan elemen data view.--componentName: Nama dalam format PascalCase untuk komponen data view Vue yang dihasilkan (contoh:ProductDetailView).--ns: Namespace JS untuk Pages dan komponen.--page: (Flag) Jika disertakan, akan menghasilkan halamanView.vue.
--page):
resources/js/Pages/[Ns]/[Entity]/components/views/[ComponentName].vueresources/js/Pages/[Ns]/[Entity]/View.vue
make:table-columns
Menghasilkan file columns.ts dengan definisi kolom untuk TanStack Table.
Struktur Perintah:
yamlFile: Path ke file YAML dengan kuncitable:yang mendefinisikan kolom.--T: Tipe TypeScript untuk data baris (contoh:Product). Ini akan digunakan untukColumnDef<Product>.--outputFile: Path lengkap untuk filecolumns.tsyang akan dihasilkan.--actionsComponent,--headerComponent: (Opsional) Menentukan nama komponen Vue kustom untuk me-render aksi baris dan header kolom yang dapat diurutkan.
- File yang ditentukan oleh
--outputFile.
make:zod-schema
Menghasilkan file schema.ts dengan skema Zod dan tipe TypeScript yang diturunkan darinya.
Struktur Perintah:
yamlFile: Path ke file YAML yang mendefinisikan field data.schemaName: Nama untuk variabel skema Zod yang diekspor (contoh:productSchema).typeName: Nama untuk tipe TypeScript yang diekspor (contoh:Product).--yamlKey: Kunci tingkat atas di file YAML yang berisi daftar field (default:vue).--outputFile: Path lengkap untuk fileschema.tsyang akan dihasilkan.
- File yang ditentukan oleh
--outputFile.
