PHPackages                             d4nd3v/crud - 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. d4nd3v/crud

ActiveLibrary

d4nd3v/crud
===========

Laravel 5 CRUD Generator

0146PHP

Since Dec 4Pushed 8y agoCompare

[ Source](https://github.com/d4nd3v/crud)[ Packagist](https://packagist.org/packages/d4nd3v/crud)[ RSS](/packages/d4nd3v-crud/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel 5.3 CRUD Generator
==========================

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

Usage
-----

[](#usage)

### Step 1: Install Through Composer

[](#step-1-install-through-composer)

```
composer require d4nd3v/crud:dev-master

```

### Step 2: Add the Service Provider

[](#step-2-add-the-service-provider)

Add the provider in `app/Providers/AppServiceProvider.php`

```
public function register()
{
    ...
	if ($this->app->environment() !== 'production') {
		$this->app->register('D4nd3v\Crud\CrudServiceProvider');
	}
}
```

### Step 3: Run Artisan!

[](#step-3-run-artisan)

Run `php artisan generate:crud TABLE_NAME` from the console.

OptionsDescription--overwrite=falseoverwrite existing files--crud=CRUDC(reate) R(read) U(pdate) D(elete)--model\_only=falseonly generates model file--parent\_of=TABLE1,TABLE2,TABLE3add links &amp; "belongs to" in model--child\_of=TABLE4,TABLE5,TABLE6generates links to parent--many\_with=TABLE1,TABLE2many to many relation--upload=field1,field2transformed to file upload fields#### Options examples

[](#options-examples)

##### `--crud=RD` =&gt; all actions without C-reate and U-pdate

[](#--crudrd--all-actions-without-c-reate-and-u-pdate)

##### `--many_with` adds:

[](#--many_with-adds)

- in model: `...$this->belongsToMany...`
- in controller: `...->sync(request()->input(....`
- in index view: `...list from MNY_TBL...`
- in create and edit view: `...js select2 MNY_TBL...`

Notes
-----

[](#notes)

If you need pagination don't forget to run:
`php artisan vendor:publish --tag=laravel-pagination`

The generated files are:

- app/Http/Controllers/Crud/\[Resource\]Controller.php
- app/Models/\[Resource\].php
- resources/views/\[Resource\]/create.blade.php
- resources/views/\[Resource\]/edit.blade.php
- resources/views/\[Resource\]/index.blade.php
- resources/views/\[Resource\]/view.blade.php
- + added route resource in routes/web.php

\####For User Roles (or any other filter)####

in ```UsersController.php````

```
	$orderBy = $request->input('by', 'id');
	....
		$roles = array();
		if (class_exists(Role::class)) {
			$roles = Role::get();
		}
		if(!empty(request()->input('role'))) {
			$items = User::role(request()->input('role'))->orderBy($orderBy, $order)->paginate(20);
		} else {
			$items = User::orderBy($orderBy, $order)->paginate(20);
		}

        return view('users.index')
            ->withItems($items)
            ->withPage($request->input('page', 1))
            ->withOrder($order)
            ->withOrderBy($orderBy)
            ->withRoles($roles);

```

in `index.blade.php`

```
	@section('content')
	.....
	@if($roles)
		all
		@foreach($roles as $role)
			&nbsp; input('role')==$role->name) class="active" @endif
			>{{ $role->name }}
		@endforeach

	@endif

```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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/dea46ed63095dfe331b75dc2c4f267ebe2a8fc3f1c6d877934e5aa175b900ab8?d=identicon)[d4nd3v](/maintainers/d4nd3v)

---

Top Contributors

[![d4nd3v](https://avatars.githubusercontent.com/u/21173540?v=4)](https://github.com/d4nd3v "d4nd3v (37 commits)")

### Embed Badge

![Health badge](/badges/d4nd3v-crud/health.svg)

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

PHPackages © 2026

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