PHPackages                             shah-newaz/redprint-ng - 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. [API Development](/categories/api)
4. /
5. shah-newaz/redprint-ng

ActiveLibrary[API Development](/categories/api)

shah-newaz/redprint-ng
======================

Laravel CRUD Generator

v3.0.6(1y ago)0185MITPHPPHP ^8.1CI failing

Since Oct 11Pushed 1y ago1 watchersCompare

[ Source](https://github.com/intellehub/redprint-ng)[ Packagist](https://packagist.org/packages/shah-newaz/redprint-ng)[ RSS](/packages/shah-newaz-redprint-ng/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (7)Versions (58)Used By (0)

Redprint - Laravel CRUD Generator with Vue.js
=============================================

[](#redprint---laravel-crud-generator-with-vuejs)

A Laravel package for generating CRUD operations with Vue.js frontend integration.

**NOTE:** Redprint is **extremely** opinionated about how you should structure your Laravel + Vue 3 project. It is designed to be used with Laravel 11+ and Vue 3+ using Element Plus and Tailwind CSS.

This package is still in development and may not be fully stable.

Installation
------------

[](#installation)

```
composer require shah-newaz/redprint-ng
```

Publish the configuration:

```
php artisan vendor:publish --tag=redprint-config
```

Requirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 11+
- Vue.js 3
- The following npm packages must be installed in your project:
    - tailwindcss
    - element-plus
    - axios
    - vue
    - vue-router
    - vue-i18n
    - lodash-es

Configuration
-------------

[](#configuration)

The package will look for your Vue router configuration file at the specified location relative to the resources directory. Make sure this path is correctly set before running the CRUD generator command.

### config/redprint.php

[](#configredprintphp)

```
return [
    /*
    |--------------------------------------------------------------------------
    | Axios Instance
    |--------------------------------------------------------------------------
    |
    | Specify the axios instance to be used in Vue components.
    | Example: 'this.$api' will generate this.$api.get() instead of axios.get()
    | Set to null to use a local axios instance with proper baseURL.
    |
    */
    'axios_instance' => null,

    /*
    |--------------------------------------------------------------------------
    | Vue Router Location
    |--------------------------------------------------------------------------
    |
    | Specify the location of your Vue router configuration file.
    | This should be relative to the resources directory.
    | Example: 'js/router/routes.ts' or 'js/router.js'
    |
    */
    'vue_router_location' => 'js/router/routes.ts',
];
```

Commands
--------

[](#commands)

### Generate CRUD

[](#generate-crud)

```
php artisan redprint:crud
```

It will prompt you for the model name, namespace, route prefix, soft deletes, and layout.

#### Example:

[](#example)

```
php artisan redprint:crud```

This will generate:
- Model (`app/Models/Product.php`)
- Controller (`app/Http/Controllers/Api/ProductController.php`)
- Resource (`app/Http/Resources/ProductResource.php`)
- Migration (`database/migrations/xxxx_xx_xx_create_products_table.php`)
- Vue Components:
  - `resources/js/pages/Product.vue`
  - `resources/js/components/Product/Index.vue`
  - `resources/js/components/Product/Form.vue`
- API Routes in `routes/api.php`
- Common Components (if not exist):
  - `resources/js/components/Common/Empty.vue`
  - `resources/js/components/Common/FormError.vue`
  - `resources/js/components/Common/InputGroup.vue`

### Generate Vue Component
```bash
php artisan redprint:vue
```

This command allows you to generate three types of Vue components:

1. **Blank Component**: A basic Vue component with minimal setup
2. **List Component**: A data table component with search, sort, and pagination
3. **Form Component**: A form component with validation and API integration

#### Usage Examples:

[](#usage-examples)

**Blank Component:**

```
php artisan redprint:vue
# Select 'blank' when prompted
# Enter component path (e.g., @/components/views/MyComponent.vue)
```

**List Component:**

```
php artisan redprint:vue
# Select 'list' when prompted
# Enter API endpoint (e.g., api/v1/products)
# Define columns when prompted
# Enter component path (e.g., @/components/views/ProductList.vue)
```

**Form Component:**

```
php artisan redprint:vue
# Select 'form' when prompted
# Enter API endpoint (e.g., api/v1/products)
# Define columns and relationships when prompted
# Enter component path (e.g., @/components/views/ProductForm.vue)
```

#### Column Definitions

[](#column-definitions)

When creating list or form components, you'll be prompted to define columns. Each column can have:

- **Name**: The field name (e.g., 'title')
- **Type**: Data type (string, text, boolean, integer, etc.)
- **Nullable**: Whether the field is required
- **Relationship Data** (optional): For form components with related models ```
    [
        'endpoint' => 'api/v1/categories/list',
        'labelColumn' => 'name',
        'relatedModelLower' => 'categories'
    ]
    ```

#### Generated Components

[](#generated-components)

**Blank Component:**

- Basic Vue 3 component structure
- Script setup syntax
- TypeScript support

**List Component:**

- Element Plus data table integration
- Search functionality
- Pagination
- Column sorting
- Delete/restore actions (if soft deletes enabled)
- API integration with configured axios instance

**Form Component:**

- Form validation
- Dynamic input types based on column definitions
- Related model select inputs (with API integration)
- Save/update functionality
- Error handling
- Loading states

All components are generated with TypeScript support and follow Vue 3's composition API patterns.

Generated API Routes
--------------------

[](#generated-api-routes)

The following API routes will be generated for each CRUD:

```
Route::prefix('v1')->middleware(['auth:api'])->group(function () {
    Route::get('products', [ProductController::class, 'getIndex']);
    Route::get('products/{id}', [ProductController::class, 'show']);
    Route::post('products/save', [ProductController::class, 'save']);
    Route::delete('products/{id}', [ProductController::class, 'delete']);
    // If soft deletes enabled:
    Route::delete('products/{id}/force', [ProductController::class, 'deleteFromTrash']);
});
```

Vue Router Integration
----------------------

[](#vue-router-integration)

The generated components will automatically integrate with Vue Router, providing the following routes:

```
{
    path: '/products',
    name: 'pages.products',
    component: ProductPage,
    children: [
        {
            path: '',
            name: 'pages.products.index',
            component: ProductIndex,
            meta: {title: 'routes.titles.products', description: 'routes.descriptions.products', requiresAuth: true},
        },
        {
            path: 'edit',
            name: 'pages.products.edit',
            component: ProductForm,
            meta: {title: 'routes.titles.edit_product', description: 'routes.descriptions.edit_product', requiresAuth: true},
        },
        {
            path: 'new',
            name: 'pages.products.new',
            component: ProductForm,
            meta: {title: 'routes.titles.new_product', description: 'routes.descriptions.new_product', requiresAuth: true},
        },
    ],
}
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance45

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 98.8% 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 ~29 days

Recently: every ~0 days

Total

57

Last Release

430d ago

Major Versions

v1.0.1 → v2.0.02025-01-26

v2.4.7 → v3.0.02025-03-02

PHP version history (3 changes)v1.0.0PHP ^7.3

v2.0.0PHP ^8.2

v2.2.1PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/fc4071c671a437425cb51aff82af32b4b28c7510c9a593da427026a5f8a07023?d=identicon)[shah-newaz](/maintainers/shah-newaz)

---

Top Contributors

[![shah-newaz](https://avatars.githubusercontent.com/u/11506530?v=4)](https://github.com/shah-newaz "shah-newaz (83 commits)")[![Shayokh](https://avatars.githubusercontent.com/u/11807461?v=4)](https://github.com/Shayokh "Shayokh (1 commits)")

---

Tags

apilaravelcrudcode-generation

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/shah-newaz-redprint-ng/health.svg)

```
[![Health](https://phpackages.com/badges/shah-newaz-redprint-ng/health.svg)](https://phpackages.com/packages/shah-newaz-redprint-ng)
```

###  Alternatives

[mollie/laravel-mollie

Mollie API client wrapper for Laravel &amp; Mollie Connect provider for Laravel Socialite

3624.1M28](/packages/mollie-laravel-mollie)[okami101/laravel-admin

Admin panel generator for Laravel 8 and based on Vuetify Admin, a separate SPA admin framework running on top of REST APIs.

382.1k](/packages/okami101-laravel-admin)

PHPackages © 2026

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