PHPackages                             coopers98/genericcrud - 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. [Admin Panels](/categories/admin)
4. /
5. coopers98/genericcrud

AbandonedArchivedLibrary[Admin Panels](/categories/admin)

coopers98/genericcrud
=====================

A GenericCRUD controller trait and corresponding views

5.6(7y ago)05131MITBladePHP &gt;=7.0

Since Oct 9Pushed 1y ago1 watchersCompare

[ Source](https://github.com/coopers98/genericcrud)[ Packagist](https://packagist.org/packages/coopers98/genericcrud)[ RSS](/packages/coopers98-genericcrud/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (15)Used By (0)

### NOTICE!!!

[](#notice)

This is quite old at this point, and is now deprecated and no longer in use. I am leaving this up and publically viewable for posterity sake.

If you are using Laravel, I recommend using Nova \[\] or Filament \[\] for general CMS use cases.

### GenericCRUD

[](#genericcrud)

A Laravel GenericCRUD Controller trait and corresponding views to give a lightweight way to scaffold database tables in Laravel.

This package evolved from what originally was a vanilla GenericUpdate package that was eventually written for Kohana and now finally for Laravel. So while there are likely much better ways of completing these tasks, this has been around a while.

### Installation

[](#installation)

```
composer require coopers98/genericcrud
```

### Service Provider

[](#service-provider)

In your app config, add the `GenericCRUD` to the providers array.

```
'providers' => [
    coopers98\GenericCRUD\GenericCRUDServiceProvider::class,
    ];
```

Usage
-----

[](#usage)

Be warned that this isn't really a turn key package right now. You'll likely need to dive into the source a little to understand how it is all going. Fear not, it is pretty straight forward and shouldn't be too hard to follow.

This is a trait so use it on a Controller that you want to have the Generic CRUD functionality on.

In your routes.php file, add a resource

```
Route::resource( 'post', 'PostController' );

```

Create your Controller and use the trait

```

use coopers98\GenericCRUD\GenericCRUD;

class PostController extends Controller {
	use GenericCRUD;

	public function __construct() {
		parent::__construct();

        	//
        	//  The name of the database table
        	//
		$this->table_name   = 'posts';

		//
		//  Name of the resource link from your routes file
		//
		$this->resourceLink = 'post';

		//
		//  Optional overrides/settings
		//
		//  Ignored columns will not be shown in the views
	    	//  $this->ignored_columns = [ 'created_at', 'updated_at', 'deleted_at' ];
	    	//
	    	//  Readonly columns will not be allowed to be edited (such as id fields, set by default )
	    	//  $this->readonly_columns = [ 'id' ];
	    	//

		//  Override the master template
		//  $this->masterTemplate = 'some_layout';
        	//

        	//  You can override any of the blade views to customize the display of the dataset
        	//  $this->showView 		= 'post.show';
	    	//  $this->indexView 		= 'post.index';
		//  $this->confirmDeleteView 	= 'post.confirm_delete';
		//  $this->editView 		= 'post.edit';
		//  $this->createView 		= 'post.create';

        	//
        	//  Call the populate columns function to load column data
        	//
		$this->populateColumns();
	}

}

```

Once you have done that, by default, you will have basic CRUD functionality

Index Show Create Store Edit Update Destroy

Additionally, you can override the resource actions to either gather additional data, provide additional data or otherwise change functionality.

There are also authorization checks called for each action.

```
	public function authorizeDelete() {
		//  Override this function and redirect or otherwise to prevent the action from completing
		//  The return value is not checked, so you should just return a redirect response here
	}

```

---

This package also includes a generic table exporter that uses the League/CSV package to export the given index view as a csv file.

### License

[](#license)

The GenericCRUD is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity66

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~81 days

Recently: every ~44 days

Total

13

Last Release

2904d ago

Major Versions

0.1.3 → 5.4.02017-12-12

0.1.2.x-dev → 5.62018-06-05

PHP version history (4 changes)0.0.1PHP &gt;=5.4.0

0.0.2PHP &gt;=5.5.9

0.1.3PHP &gt;=5.6

5.5.0PHP &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/bb959f7edee09f2c7f599692e02605989993c42fefd55c3b2675b15a95665510?d=identicon)[coopers98](/maintainers/coopers98)

---

Top Contributors

[![coopers98](https://avatars.githubusercontent.com/u/116313?v=4)](https://github.com/coopers98 "coopers98 (12 commits)")

---

Tags

laravelscaffoldcrud

### Embed Badge

![Health badge](/badges/coopers98-genericcrud/health.svg)

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

###  Alternatives

[dog-ears/crud-d-scaffold

Extend Laravel 7's generators scaffold.

183.1k](/packages/dog-ears-crud-d-scaffold)

PHPackages © 2026

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