PHPackages                             marceauka/laravel-crudable - 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. marceauka/laravel-crudable

AbandonedArchivedPlugin[Admin Panels](/categories/admin)

marceauka/laravel-crudable
==========================

Laravel CRUD builder powered by custom fields

2.0.2(9y ago)401953MITPHPPHP &gt;=5.6.4

Since Jan 28Pushed 9y ago6 watchersCompare

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

READMEChangelogDependencies (6)Versions (5)Used By (0)

Laravel Crudable
================

[](#laravel-crudable)

[![Build Status](https://camo.githubusercontent.com/70a081f5c9ac3e0e109d09bd5fff274c7f1b11842ee03ac672d6c6a43eee0563/68747470733a2f2f7472617669732d63692e6f72672f4d6172636561754b612f6c61726176656c2d6372756461626c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/MarceauKa/laravel-crudable) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/db52c8d5e8c471dd9c4a9e398705084cf1de9a2d04eecfb4771ce7e06d8a0c4c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4d6172636561754b612f6c61726176656c2d6372756461626c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/MarceauKa/laravel-crudable/?branch=master)

Laravel Crudable is a library built to bring **Custom Fields** powered **CRUD functionnalities** to **your Eloquent models**.

Summary
-------

[](#summary)

A step by step tutorial for beginners is available here: [Beginner Guide](docs/beginner_guide.md) (also available as a 3 min [video](https://youtu.be/Cb8ext3G8E0)).

- [Goals](#goals)
- [Installation](#installation)
- [Usage](#usage)
- [Fields](#fields)
- [Controller and routes](#controller-and-routes)
- [Customizing](#customizing)
- [Tests](#tests)
- [Contribute](#contribute)

Goals
-----

[](#goals)

- Easy to integrate on a **new project**
- Easy to integrate to an **existing project**
- Non-intrusive API (just add a trait and one method to your model)
- Focus on fields
- Customizable
- Laravel's way

### Non-goals

[](#non-goals)

- Roles or permissions
- Admin panel

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

[](#installation)

This version is compatible with Laravel **5.4** and **5.3**. For Laravel 5.2 compatibility see the branch **1.0**.

Install via composer:

```
composer require marceauka/laravel-crudable
```

Then register the service provider in your `config/app.php`.

```
// After other service providers
Akibatech\Crud\CrudServiceProvider::class
```

Finally, publish resources:

```
php artisan vendor:publish --tag=crud
```

This command will publish language files and views for easy customization.

Usage
-----

[](#usage)

Add the trait `Crudable` to your Eloquent Model, then implement the required method `getCrudFields`

Example model:

```
class Post extends Model
{
    use Crudable;

    /**
     * @return \Akibatech\Crud\Services\CrudFields
     */
    public function getCrudFields()
    {
        return CrudFields::make([
            // Bind the title attribute to a required Text Field.
            TextField::handle('title', 'required|min:3')->withPlaceholder('Title of the post'),

            // Bind the introduction attribute to a required Textarea Field.
            TextareaField::handle('introduction', 'required|min:3')->withPlaceholder('Short introduction'),

            // Bind the content attribute to a Tinymce Field
            TinymceField::handle('content', 'required'),

            // Bind the illustration attribute to a file upload allowing 10Mb JPG or PNG picture
            FileUploadField::handle('illustration')->withMaxSize(1024 * 1024)->withTypes('jpeg,png'),

            // Bind the status attribute to a Radio Field allowing Draft or Live options.
            RadioField::handle('status', 'required')->withOptions([0 => 'Draft', 1 => 'Live'])
        ]);
    }
}
```

### Display the table of entries

[](#display-the-table-of-entries)

In your controller:

```
    public function index()
    {
        $model = App\Post::class;

        return view('your-view', compact($model));
    }
```

In your view:

```
@crudtable($model)
```

Learn more: [The Table](docs/the_table.md)

[![Entry table](https://github.com/AkibaTech/laravel-crudable/raw/master/resources/screenshot-table.png)](https://github.com/AkibaTech/laravel-crudable/blob/master/resources/screenshot-table.png)

### Display the entry create form

[](#display-the-entry-create-form)

In your controller:

```
    public function create()
    {
        $model = App\Post::class;

        return view('your-view', compact($model));
    }

    public function store(Request $request)
    {
        $entry = (new App\Post)->crudEntry();
        $validation = $entry->validate($request->all());

        if ($validation->passes())
        {
            $validation->save();
        }

        // Redirect to the form with the errors if validation fails, or to the index page
        return $validation->redirect();
    }
```

In your view:

```
@crudentry($model)
```

Learn more: [The Entry](docs/the_entry.md)

[![Entry form](https://github.com/AkibaTech/laravel-crudable/raw/master/resources/screenshot-create.png)](https://github.com/AkibaTech/laravel-crudable/blob/master/resources/screenshot-create.png)

Fields
------

[](#fields)

Fields are the way to bind your **model attributes** to **powerful behaviors** and **reusable view components**.

At this stage, you can use `TextField`, `TextareaField`, `RadioField`, `EmailField`, `TinymceField`, `FileUploadField`, `SelectRelationField` and `DatePickerField`, but many others are planned.

Lean more: [Fields](docs/fields.md)

Controller and routes
---------------------

[](#controller-and-routes)

By default each crudded model needs a Controller.

You can scaffold it with the command `make:crud:controller  `.
Ex: `artisan make:crud:controller PostsController Post`.

This command will generate a CRUD ready controller for your model with some scaffolded views but it's up to you to customize them.

Once generated, your need to register routes like this:

```
// routes/web.php
App\Post::crudRoutes();
```

Learn more: [Routes and controlllers](docs/routes_and_controllers.md)

Customizing
-----------

[](#customizing)

All views are customizable and are stored in `resources/views/vendor/crud`.

Complete documentation: [Customize Views](docs/customize_views.md)

Tests
-----

[](#tests)

You can launch tests with

```
vendor/bin/phpunit
```

Contribute
----------

[](#contribute)

Feel free to contribute using issues and pull requests on this repo.

### Authors

[](#authors)

- [Marceau Casals](https://marceau.casals.fr)

### Licence

[](#licence)

[The MIT License (MIT)](https://opensource.org/licenses/MIT)Copyright (c) 2016 Marceau Casals

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

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

Total

3

Last Release

3392d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1665333?v=4)[Marceau Casals](/maintainers/MarceauKa)[@MarceauKa](https://github.com/MarceauKa)

---

Top Contributors

[![MarceauKa](https://avatars.githubusercontent.com/u/1665333?v=4)](https://github.com/MarceauKa "MarceauKa (78 commits)")[![AkibaTech](https://avatars.githubusercontent.com/u/82867646?v=4)](https://github.com/AkibaTech "AkibaTech (4 commits)")

---

Tags

crudfieldslaravelpackagelaravelcrudadminfields

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/marceauka-laravel-crudable/health.svg)

```
[![Health](https://phpackages.com/badges/marceauka-laravel-crudable/health.svg)](https://phpackages.com/packages/marceauka-laravel-crudable)
```

###  Alternatives

[laravelrus/sleepingowl

Administrative interface builder for Laravel.

810219.6k3](/packages/laravelrus-sleepingowl)

PHPackages © 2026

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