PHPackages                             atk/laraquickcrud - 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. atk/laraquickcrud

ActiveLibrary[Framework](/categories/framework)

atk/laraquickcrud
=================

A custom Laravel CRUD generator package

0376PHP

Since Jun 3Pushed 11mo agoCompare

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

READMEChangelogDependenciesVersions (2)Used By (0)

Laravel CRUD Generator Package
==============================

[](#laravel-crud-generator-package)

Developer Usage Guide
---------------------

[](#developer-usage-guide)

The `atk/laraquickcrud` package accelerates Laravel development by automating the creation of standard CRUD (Create, Read, Update, Delete) components. With a single Artisan command, you can generate:

- Eloquent Models
- Resourceful Controllers (for web or API)
- Form Request classes for validation
- Database Migrations
- Blade Views (for web UI)
- Resourceful Routes

This package saves you significant time by generating boilerplate code, allowing you to focus on your application's unique logic.

---

Table of Contents
-----------------

[](#table-of-contents)

1. [Installation](#installation)
2. [Usage](#usage)

    - [Basic Generation](#basic-generation)
    - [Generating with Fields](#generating-with-fields)
    - [API-Only Generation](#api-only-generation)
3. [Step-by-Step Usage Guide](#step-by-step-usage-guide)
4. [Configuration](#configuration)

    - [Default Paths](#default-paths)
    - [Namespaces](#namespaces)
    - [Primary Key Type](#primary-key-type)
    - [Custom Replacements](#custom-replacements)
5. [Customizing Generated Code (Stubs)](#customizing-generated-code-stubs)

    - [Publishing Stubs](#publishing-stubs)
    - [Modifying Stub Files](#modifying-stub-files)
    - [Available Placeholders](#available-placeholders)
6. [Troubleshooting and Tips](#troubleshooting-and-tips)
7. [License](#license)

---

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

[](#installation)

### Step 1: Install the Package

[](#step-1-install-the-package)

Run the following Composer command in your Laravel project's root directory:

```
composer require atk/laraquickcrud
```

*Note: If you are developing this package locally or using it from a private repository, you might need to add a `repositories` entry to your `composer.json` before running the `composer require` command.*

### Step 2: Register the Service Provider (Laravel 11+)

[](#step-2-register-the-service-provider-laravel-11)

For Laravel 11 and above, package service providers are typically auto-discovered. However, if you encounter issues, you can explicitly register the service provider in your `config/app.php` file:

```
'providers' => [
    // ...
    Atk\LaraQuickCrud\LaraQuickCrudServiceProvider::class,
],
```

### Step 3: Publish Configuration and Stubs (Optional)

[](#step-3-publish-configuration-and-stubs-optional)

To customize the default settings and stub files, publish them to your application's `config` and `resources/stubs` directories:

```
php artisan vendor:publish --tag=laraquickcrud-config
php artisan vendor:publish --tag=laraquickcrud-stubs
```

This will create:

- `config/laraquickcrud.php`
- `resources/stubs/laraquickcrud/` (containing all stub files)

---

Usage
-----

[](#usage)

The package provides a single Artisan command: `make:crud`.

### Basic Generation

[](#basic-generation)

To generate a full CRUD for a model named `Post`:

```
php artisan make:crud Post
```

This command will generate:

- `app/Models/Post.php`
- `app/Http/Controllers/PostController.php`
- `app/Http/Requests/PostStoreRequest.php`
- `app/Http/Requests/PostUpdateRequest.php`
- A migration file for the `posts` table (with `id` and timestamps).
- Blade views:

    - `resources/views/posts/index.blade.php`
    - `resources/views/posts/create.blade.php`
    - `resources/views/posts/edit.blade.php`
    - `resources/views/posts/show.blade.php`
- A resourceful route `Route::resource('posts', PostController::class);` appended to `routes/web.php`.

### Generating with Fields

[](#generating-with-fields)

You can specify fields for your model using the `--fields` option. Fields should be comma-separated, with each field defined as `name:type`.

**Example:**

```
php artisan make:crud Product --fields=name:string,description:text,price:decimal,stock:integer,is_active:boolean
```

This will:

- Add fields to the `$fillable` array in the `Product` model.
- Generate corresponding columns in the migration.
- Add basic validation rules to Form Requests.
- Generate form fields and table columns in the Blade views.

### API-Only Generation

[](#api-only-generation)

To generate only API resources (model, API controller, requests, migration, and API routes) without any Blade views, use the `--api` option:

```
php artisan make:crud User --api --fields=name:string,email:string,password:string
```

This will:

- Generate `UserApiController.php`.
- Add API route to `routes/api.php`.
- Skip Blade view generation.

---

Step-by-Step Usage Guide
------------------------

[](#step-by-step-usage-guide)

1. **Generate the CRUD:**

    ```
    php artisan make:crud MyModel --fields=field1:string,field2:text
    ```
2. **Run Database Migrations:**

    ```
    php artisan migrate
    ```
3. **Review and Customize Files:**

    - Modify controllers, models, and views as needed.
    - Ensure your `layouts/app.blade.php` file exists and includes Bootstrap 5 or other styles.
4. **Test the CRUD:**

    ```
    php artisan serve
    ```

    Navigate to `http://127.0.0.1:8000/mymodels` in your browser.

---

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

[](#configuration)

Published config file: `config/laraquickcrud.php`

You can customize:

- Default namespaces
- Path settings for models, controllers, views, etc.
- Default validation rules
- Field type-to-validation mappings

---

Customizing Generated Code (Stubs)
----------------------------------

[](#customizing-generated-code-stubs)

### Publishing Stubs

[](#publishing-stubs)

```
php artisan vendor:publish --tag=laraquickcrud-stubs
```

This publishes stubs to: `resources/stubs/laraquickcrud/`

### Modifying Stub Files

[](#modifying-stub-files)

You can customize any part of the scaffolding. For example:

- `controller.stub`
- `model.stub`
- `form-request.stub`
- `index.blade.stub`

### Available Placeholders

[](#available-placeholders)

You can use the following in stubs:

- `{{ modelName }}`
- `{{ modelVariable }}`
- `{{ modelPlural }}`
- `{{ modelTitle }}`
- `{{ fields }}`
- `{{ validationRules }}`

---

Troubleshooting and Tips
------------------------

[](#troubleshooting-and-tips)

- Make sure to run `php artisan config:clear` after changing the config file.
- If views don't render, verify `layouts/app.blade.php` exists and uses `@yield('content')`.
- Always review generated code for security, especially validation logic.
- Use the `--api` flag for SPA or mobile backend APIs.

---

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](LICENSE).

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/8183b63bb9f83490810fa1944e8528c0d68d464ed40c2833f2bc67c880823e30?d=identicon)[ayethan](/maintainers/ayethan)

---

Top Contributors

[![ayethan](https://avatars.githubusercontent.com/u/33274399?v=4)](https://github.com/ayethan "ayethan (3 commits)")

### Embed Badge

![Health badge](/badges/atk-laraquickcrud/health.svg)

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

###  Alternatives

[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M532](/packages/laravel-passport)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

712181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)[laravel/pail

Easily delve into your Laravel application's log files directly from the command line.

91545.3M590](/packages/laravel-pail)

PHPackages © 2026

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