PHPackages                             shahrakii/crudly - 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. shahrakii/crudly

ActiveLibrary[Framework](/categories/framework)

shahrakii/crudly
================

Automatic, intelligent CRUD generator for Laravel. Generate controllers, models, migrations, and views in seconds.

23PHP

Since Feb 19Pushed 4mo agoCompare

[ Source](https://github.com/Shahrakii/Crudly)[ Packagist](https://packagist.org/packages/shahrakii/crudly)[ RSS](/packages/shahrakii-crudly/feed)WikiDiscussions main Synced today

READMEChangelog (1)DependenciesVersions (1)Used By (0)

📋 Crudly - Laravel CRUD Generator
=================================

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

**Crudly** is a powerful Laravel package that automatically generates complete CRUD (Create, Read, Update, Delete) operations with beautiful dark-themed views, custom models, and controllers. Built with Laravel 12+ compatibility and Tailwind CSS.

---

✨ Features
----------

[](#-features)

✅ One-Command CRUD Generation
✅ Dark Theme UI with Tailwind CSS
✅ Smart Schema Detection
✅ Implicit Model Binding
✅ Auto Validation Rules
✅ Customizable Stubs
✅ Responsive Tables
✅ Built-in Column Filtering
✅ Smart Form Generation
✅ Auto Routes Registration
✅ Professional Admin Layout

---

📦 Requirements
--------------

[](#-requirements)

- PHP 8.2+
- Laravel 12.0+
- Composer
- Tailwind CSS

---

🚀 Installation
--------------

[](#-installation)

### Step 1: Install Package

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

```
composer require shahrakii/crudly:@dev
```

### Step 2: Publish Configuration

[](#step-2-publish-configuration)

```
php artisan vendor:publish --provider="Shahrakii\Crudly\CrudlyServiceProvider"
```

This creates `config/crudly.php`

### Step 3: Verify Installation

[](#step-3-verify-installation)

```
php artisan list crudly
```

You should see:

```
crudly:generate     Generate complete CRUD operations for a model
crudly:model        Generate a model with fillable properties
crudly:controller   Generate a CRUD controller for a model

```

---

⚙️ Configuration
----------------

[](#️-configuration)

Edit `config/crudly.php`:

```
return [
    'route_prefix' => env('CRUDLY_ROUTE_PREFIX', 'crudly'),

    'middleware' => env('CRUDLY_MIDDLEWARE', ['web']),

    'global_filters' => [
        'id',
        'created_at',
        'updated_at',
        'deleted_at',
    ],

    'table_filters' => [],

    'exclude_tables' => [
        'migrations',
        'failed_jobs',
        'password_resets',
        'password_reset_tokens',
        'personal_access_tokens',
        'sessions',
    ],

    'pagination' => env('CRUDLY_PAGINATION', 15),

    'css_framework' => env('CRUDLY_CSS_FRAMEWORK', 'tailwind'),
];
```

---

📖 Quick Start (5 Minutes)
-------------------------

[](#-quick-start-5-minutes)

### Step 1: Create Database Table

[](#step-1-create-database-table)

```
php artisan make:migration create_posts_table
```

Edit `database/migrations/YYYY_MM_DD_HHMMSS_create_posts_table.php`:

```
public function up(): void
{
    Schema::create('posts', function (Blueprint $table) {
        $table->id();
        $table->string('title');
        $table->text('content');
        $table->string('slug')->unique();
        $table->timestamps();
    });
}
```

### Step 2: Run Migration

[](#step-2-run-migration)

```
php artisan migrate
```

### Step 3: Generate CRUD

[](#step-3-generate-crud)

```
php artisan crudly:generate Post --routes
```

### Step 4: Start Server

[](#step-4-start-server)

```
php artisan serve
```

### Step 5: Visit Your App

[](#step-5-visit-your-app)

Open browser: ****

You now have:

- ✅ List page with table
- ✅ Create form
- ✅ Edit form
- ✅ View details
- ✅ Delete functionality

---

🔨 Commands Reference
--------------------

[](#-commands-reference)

### Generate Complete CRUD

[](#generate-complete-crud)

```
php artisan crudly:generate Post --routes
```

**What it generates:**

- Model: `app/Models/Post.php`
- Controller: `app/Http/Controllers/PostController.php`
- Views: `resources/views/posts/index.blade.php`, `create.blade.php`, `edit.blade.php`, `show.blade.php`
- Routes: Added to `routes/web.php`

**Options:**

```
# Force overwrite existing files
php artisan crudly:generate Post --force --routes

# Specify custom table name
php artisan crudly:generate Article --table=blog_posts --routes

# Generate without routes (add manually later)
php artisan crudly:generate Post
```

### Generate Only Model

[](#generate-only-model)

```
php artisan crudly:model Post
```

**Output:** `app/Models/Post.php`

**With force:**

```
php artisan crudly:model Post --force
```

### Generate Only Controller

[](#generate-only-controller)

```
php artisan crudly:controller PostController Post
```

**Output:** `app/Http/Controllers/PostController.php`

**With force:**

```
php artisan crudly:controller PostController Post --force
```

---

📁 Generated File Structure
--------------------------

[](#-generated-file-structure)

```
your-project/
├── app/
│   ├── Models/
│   │   └── Post.php
│   └── Http/Controllers/
│       └── PostController.php
├── resources/
│   └── views/
│       ├── layouts/
│       │   └── app.blade.php
│       └── posts/
│           ├── index.blade.php
│           ├── create.blade.php
│           ├── edit.blade.php
│           └── show.blade.php
├── config/
│   └── crudly.php
├── routes/
│   └── web.php
└── database/
    └── migrations/
        └── 2026_02_16_create_posts_table.php

```

---

🎨 Complete Workflow Examples
----------------------------

[](#-complete-workflow-examples)

### Example 1: Create Products CRUD

[](#example-1-create-products-crud)

```
# Step 1: Create migration
php artisan make:migration create_products_table

# Step 2: Edit migration file
# Add columns: id, name, price, description, timestamps

# Step 3: Run migration
php artisan migrate

# Step 4: Generate CRUD
php artisan crudly:generate Product --routes

# Step 5: Start server
php artisan serve

# Step 6: Visit
# http://localhost:8000/products
```

### Example 2: Create Categories CRUD

[](#example-2-create-categories-crud)

```
php artisan make:migration create_categories_table
# Edit: id, name, slug, description, timestamps
php artisan migrate
php artisan crudly:generate Category --routes
php artisan serve
# Visit: http://localhost:8000/categories
```

### Example 3: Create Users CRUD

[](#example-3-create-users-crud)

```
php artisan crudly:generate User --routes
php artisan serve
# Visit: http://localhost:8000/users
```

### Example 4: Multiple CRUDs

[](#example-4-multiple-cruds)

```
# Create all tables first
php artisan make:migration create_posts_table
php artisan make:migration create_categories_table
php artisan make:migration create_tags_table

# Edit all migration files with columns

# Run all migrations
php artisan migrate

# Generate all CRUDs
php artisan crudly:generate Post --routes
php artisan crudly:generate Category --routes
php artisan crudly:generate Tag --routes

# Start server
php artisan serve

# Visit:
# http://localhost:8000/posts
# http://localhost:8000/categories
# http://localhost:8000/tags
```

---

🌙 Dark Theme Layout
-------------------

[](#-dark-theme-layout)

The package generates a professional dark-themed layout.

### File Location

[](#file-location)

```
resources/views/layouts/app.blade.php

```

### Features

[](#features)

- Dark gray background (bg-gray-900)
- Blue accent colors
- Responsive sidebar
- Beautiful tables
- Smooth transitions
- Mobile-friendly

### Customize Colors

[](#customize-colors)

Edit `resources/views/layouts/app.blade.php`:

```

```

---

🔧 Customization Guide
---------------------

[](#-customization-guide)

### Edit Stubs (Templates)

[](#edit-stubs-templates)

Location:

```
vendor/shahrakii/crudly/resources/stubs/

```

Available stubs:

```
vendor/shahrakii/crudly/resources/stubs/
├── model/
│   └── model.stub
├── controller/
│   └── controller.stub
└── views/
    ├── index.stub
    ├── create.stub
    ├── edit.stub
    ├── show.stub
    ├── form-field.stub
    └── display-field.stub

```

### Template Placeholders

[](#template-placeholders)

PlaceholderExampleUse`{{ MODEL }}`PostModel class name`{{ MODEL_LOWER }}`postCamel case`{{ MODEL_PLURAL }}`PostsPlural`{{ MODEL_PLURAL_SNAKE }}`postsSnake case`{{ TABLE }}`postsDatabase table`{{ FILLABLE }}`\['title', 'content'\]Fillable array`{{ RULES }}`\[...\]Validation rules`{{ COLUMN_HEADERS }}`TitleTable headers`{{ COLUMN_DATA }}`{{ data }}Table data`{{ FORM_FIELDS }}`Input fieldsForm inputs`{{ DISPLAY_FIELDS }}`Display blocksShow page### Example: Customize Model Stub

[](#example-customize-model-stub)

Edit `vendor/shahrakii/crudly/resources/stubs/model/model.stub`:

```
