PHPackages                             zekini/livewire-crud-generator - 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. zekini/livewire-crud-generator

ActiveLibrary

zekini/livewire-crud-generator
==============================

This helps in scaffolding the necessary CRUD and admin panel for applications

v2.0(4y ago)11.7k[1 PRs](https://github.com/zekini-com/livewire-crud-generartor/pulls)MITCSS

Since Dec 9Pushed 4y ago1 watchersCompare

[ Source](https://github.com/zekini-com/livewire-crud-generartor)[ Packagist](https://packagist.org/packages/zekini/livewire-crud-generator)[ RSS](/packages/zekini-livewire-crud-generator/feed)WikiDiscussions master Synced today

READMEChangelog (8)Dependencies (1)Versions (20)Used By (0)

Introduction
============

[](#introduction)

The **zekini/livewire-crud-generator** package allows us to generate an admin panel and generate crud for applications

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

[](#installation)

`composer require --dev zekini/livewire-crud-generator`

Usage
-----

[](#usage)

To scaffold admin ui and authentication `php artisan admin:scaffold`

To run the created migrations `php artisan migrate`

To generate a super admin `php artisan admin:superuser`ensure user class uses the `HasRoles` spatie trait

To generate crud for default package tables `php artisan admin:crud:package-tables`

To setup relationship mappings on a model simply go to the zekini-admin config under relationships To generate crud for a particular model. Simply create the migration file for that crud and migrate to the database

After the you simply run admin:crud generate command wth the table name

`php artisan admin:crud:generate tablename`This will generate all views, routes, factories, controllers, permissions, requests, unit test, models need to crud this application

Relationships
-------------

[](#relationships)

For tables with foreign keys ensure to update the relationships array of the zekini config file

Eg for a post relationship belonging to users. where record title is the record you want to show from the foreign table

```
'posts'=> [
	[
	'name' => 'belongs_to',
	'table'=> 'users',
	'record_title'=> 'name'
	]
]

```

Images and Files
----------------

[](#images-and-files)

By default when a table has column name of `image` or `file` the traits for file upload will automatically be generated and added but incase where your column name is an image and is not named in that manner you can do the following to process image uploads. In your edit and create components `use  Livewire\WithFileUploads;`

Add this line just before the line that creates the model

```
`$this->column_name = $this->getFile($this->column_name)`

```

For edit components you simply check if the first element of that array is a TemporaryUploadedFile

```
`if($this->column_name[0] instanceof TemporaryUploadedFile) {
$this->column_name = $this->getFile($this->column_name);
$this->deleteFile($this->$modelClass->column_name); // delete old image
}`

```

In your list component change the column to a callback to display an image

```
`Column::callback(['column_name'], function ($column_name) {
	return view('zekini/livewire-crud-generator::datatable.image-display', ['file' => $column_name]);
})->unsortable()->excludeFromExport(),`

```

In your form.blade.php for the model simply add the input type as file and multiple on it.

For your unit test replace the column values for a fake uploaded file in an array as files are threated as multiple uploads for a model `[\Illuminate\Http\UploadedFile::fake()->image('file.jpg')]`and also in your factories replace image column value with an array `'["file.jpeg"]'`

Laravel Jetstream
-----------------

[](#laravel-jetstream)

With the integration of laravel jetstream, ensure you run the following commands `npm install``npm run dev`

Landing Page
------------

[](#landing-page)

In other to force delete the current landing page run `php artisan vendor:publish --tags=views --force`

Options
-------

[](#options)

You can use this additional arguments with crud generator command to customize what components gets generated `php artisan admin:crud:generate --only=component-datatable`The above will generate only the datatable component

`php artisan admin:crud:generate --exclude=model`The above will generate all other components except the model

`php artisan admin:crud:generate --readonly`The above will generate all components with a readonly datatable

A full list of keys is given below

```
        'model' => 'Model Component',
        'route' => 'Route and Sidebar',
        'form' => 'Generate Form',
        'view-index' => 'Livewire Index view',
        'component-datatable' => 'Livewire datatable component',
        'component-index' => 'Livewire index component',
        'permission' => 'Generate Permissions',
        'test-datatable' => 'Datatable Test',
        'test-index' => 'Index Component Test',
        'factory' => 'Factory class'

```

Note
----

[](#note)

You are required to add a custom middleware to redirect to admin or users based on the role of the given user

Dependency Issues
-----------------

[](#dependency-issues)

if you encounter any dependeny issues when installing package delete composer.lock file and require the package

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

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

Recently: every ~15 days

Total

11

Last Release

1468d ago

Major Versions

1.0.9 → v2.02022-05-03

### Community

Maintainers

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

---

Top Contributors

[![Keania-Eric](https://avatars.githubusercontent.com/u/29646053?v=4)](https://github.com/Keania-Eric "Keania-Eric (189 commits)")[![irfan-ansari-au28](https://avatars.githubusercontent.com/u/18440293?v=4)](https://github.com/irfan-ansari-au28 "irfan-ansari-au28 (14 commits)")[![Llewdur](https://avatars.githubusercontent.com/u/13761739?v=4)](https://github.com/Llewdur "Llewdur (7 commits)")

### Embed Badge

![Health badge](/badges/zekini-livewire-crud-generator/health.svg)

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

PHPackages © 2026

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