generators-getting-started

Generate LaraJS models, migrations, and API configurations for Laravel applications.

2|Updated Sep 30, 2024
One-click install
npx skills add https://github.com/maingocthanhtan96/larajs-docs --skill generators-getting-started
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: generators-getting-started
Source: https://github.com/maingocthanhtan96/larajs-docs/tree/main/.claude/skills/generators-getting-started
Command: npx skills add https://github.com/maingocthanhtan96/larajs-docs --skill generators-getting-started

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines the process of defining and generating backend API structures, database schemas, and frontend CMS components for Laravel applications, reducing manual coding effort and ensuring consistency.

Core Features & Use Cases

  • Model Definition: Configure model names, display names, and various options like timestamps, soft deletes, and API generation flags.
  • Field Configuration: Define database fields with types, display names, default values, and UI/search/sort/show options.
  • Relationship Management: Set up one-to-one, one-to-many, and many-to-many relationships between models.
  • DBML Import: Automatically generate model configurations by importing existing DBML schemas.
  • Use Case: Quickly scaffold a new resource (e.g., 'Product') by defining its fields (name, price, description), relationships (e.g., belongs to 'Category'), and options (timestamps, API only), then let the generator create the Eloquent model, migration, and API routes.

Quick Start

Use the generators-getting-started skill to define a new model named 'Product' with a 'name' field of type VARCHAR and a 'price' field of type DECIMAL.

Frequently Asked Questions about generators-getting-started

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate Laravel models and API configurations from a database schema?

You can generate Laravel models and API configurations by defining model names, fields with database types, and relationship setups. The generator creates Eloquent models, migrations, and API routes, reducing manual coding effort and ensuring consistency across your backend API structures.

Can I import an existing DBML schema to automatically create Laravel models and migrations?

Yes, DBML import is supported for schema-driven generation. You can import existing DBML schemas to automatically generate model configurations, mapping database types to Laravel Eloquent models and migration files without manual field definition.

How do I set up many-to-many relationships with pivot tables when generating Laravel API resources?

Relationship management is handled during generation. You can configure one-to-one, one-to-many, and many-to-many relationships between models, and the generator will automatically create the necessary pivot tables and relationship definitions for your Laravel application.

What Laravel model options are supported, such as timestamps and soft deletes?

The generator supports detailed model options including timestamps, soft deletes, and API generation flags. You can also configure field definitions with display names, default values, and UI, search, sort, and show options for frontend CMS components.

Does this generator work without any external dependencies or packages?

Yes, the generator operates without external dependencies. It uses internal scripts and references to scaffold backend API structures, database schemas, and frontend CMS components for Laravel applications directly from your model definitions.