PHPackages                             simexis/rapyd - 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. simexis/rapyd

ActiveLibrary[Admin Panels](/categories/admin)

simexis/rapyd
=============

crud widgets for laravel, to make an admin in few lines of code

2.2.7(9y ago)010JavaScriptPHP &gt;=5.4.0

Since May 10Pushed 8y ago1 watchersCompare

[ Source](https://github.com/jooorooo/rapyd-laravel)[ Packagist](https://packagist.org/packages/simexis/rapyd)[ Docs](https://github.com/zofe/rapyd-laravel)[ RSS](/packages/simexis-rapyd/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (88)Used By (0)

rapyd-laravel
=============

[](#rapyd-laravel)

[![Join the chat at https://gitter.im/zofe/rapyd-laravel](https://camo.githubusercontent.com/abe08b740a4156153736f791393ec4da6619c4be73212e75769f52edacc0e2b5/68747470733a2f2f6261646765732e6769747465722e696d2f4a6f696e253230436861742e737667)](https://gitter.im/zofe/rapyd-laravel?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

[ ![](https://camo.githubusercontent.com/579f98f9ad8d702844ad00785bc44c38d1c02a05756c6021aedba0d969cfae9d/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a6f66652f72617079642e7376673f7374796c653d666c6174)](https://packagist.org/packages/zofe/rapyd)[ ![](https://camo.githubusercontent.com/fd0010e95c90fc207f1ded46b0a5df86304fb4a9691a90909b67a38a3ff46847/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7a6f66652f72617079642e7376673f7374796c653d666c6174)](https://packagist.org/packages/zofe/rapyd)This is a pool of presentation and editing widgets (Grids and Forms) for laravel.
Nothing to "generate", just some classes to let you develop and maintain CRUD backends in few lines of code.

Main Website: [rapyd.com](http://www.rapyd.com)
Demo: [rapyd.com/demo](http://www.rapyd.com/demo)
Documentation: [Wiki](https://github.com/zofe/rapyd-laravel/wiki)

[![rapyd laravel](https://camo.githubusercontent.com/357a2afece18152251f99ba8ca3dc4b40c85e1db0764ca27fa2ac6933306773f/68747470733a2f2f7261772e6769746875622e636f6d2f7a6f66652f72617079642d6c61726176656c2f6d61737465722f7075626c69632f6173736574732f72617079642d6c61726176656c2e706e67)](https://camo.githubusercontent.com/357a2afece18152251f99ba8ca3dc4b40c85e1db0764ca27fa2ac6933306773f/68747470733a2f2f7261772e6769746875622e636f6d2f7a6f66652f72617079642d6c61726176656c2f6d61737465722f7075626c69632f6173736574732f72617079642d6c61726176656c2e706e67)

A couple of minutes of your time
--------------------------------

[](#a-couple-of-minutes-of-your-time)

I came from an era where there was mutual appreciation among programmers, I would like to use two minutes of your time to recognize my usefulness and my experience on linkedin, if you use this library and benefit from it.. please link-me and write a short review.
Thanks to Mihai Berende for having done it already
[me@linkedin](https://www.linkedin.com/in/feliceostuni/)

Install in Laravel 5.2, 5.1, 5.0, 4.\*
--------------------------------------

[](#install-in-laravel-52-51-50-4)

dev-master should work laravel 5.2 but is tested on 5.1 (LTS)

1. To `composer.json` add:
    `"zofe/rapyd": "2.2.*"` for Laravel 5.2
    `"zofe/rapyd": "2.1.*"` for Laravel 5.1
    `"zofe/rapyd": "2.0.*"` for Laravel 5.0
    `"zofe/rapyd": "1.3.*"` for Laravel 4.\*
2. run `$ composer update zofe/rapyd`
3. add this in the "provider" array on your config/app.php:
    `Zofe\Rapyd\RapydServiceProvider::class,`
    or for &lt; 5.1
    `'Zofe\Rapyd\RapydServiceProvider',`
4. then publish assets:
    `$ php artisan vendor:publish`
    or for &lt; 5.0
    `$ php artisan asset:publish zofe/rapyd`
    `$ php artisan config:publish zofe/rapyd`
5. (optional) enable demo, uncomment the route:

```
#  /app/Http/rapyd.php
// Route::controller('rapyd-demo','\Zofe\Rapyd\Demo\DemoController');
```

DataGrid
--------

[](#datagrid)

DataGrid extend [DataSet](https://github.com/zofe/rapyd-laravel/wiki/DataSet) to make data-grid output with few lines of fluent code.
It build a bootstrap striped table, with pagination at bottom and order-by links on table header. It support also blade syntax, filters, closures etc..

in a controller

```
   $grid = \DataGrid::source(Article::with('author'));  //same source types of DataSet

   $grid->add('title','Title', true); //field name, label, sortable
   $grid->add('author.fullname','author'); //relation.fieldname
   $grid->add('{{ substr($body,0,20) }}...','Body'); //blade syntax with main field
   $grid->add('{{ $author->firstname }}','Author'); //blade syntax with related field
   $grid->add('body|strip_tags|substr[0,20]','Body'); //filter (similar to twig syntax)
   $grid->add('body','Body')->filter('strip_tags|substr[0,20]'); //another way to filter
   $grid->edit('/articles/edit', 'Edit','modify|delete'); //shortcut to link DataEdit actions

   //cell closure
   $grid->add('revision','Revision')->cell( function( $value, $row) {
        return ($value != '') ? "rev.{$value}" : "no revisions for art. {$row->id}";
   });

   //row closure
   $grid->row(function ($row) {
       if ($row->cell('public')->value < 1) {
           $row->cell('title')->style("color:Gray");
           $row->style("background-color:#CCFF66");
       }
   });

   $grid->link('/articles/edit',"Add New", "TR");  //add button
   $grid->orderBy('article_id','desc'); //default orderby
   $grid->paginate(10); //pagination

   view('articles', compact('grid'))
```

in a view you can just write

```
  #articles.blade.php

  {!! $grid !!}
```

styling a datagrid

```
   ...
   $grid->add('title','Title', true)->style("width:100px"); //adding style to th
   $grid->add('body','Body')->attr("class","custom_column"); //adding class to a th
   ...
    //row and cell manipulation via closure
    $grid->row(function ($row) {
       if ($row->cell('public')->value < 1) {
           $row->cell('title')->style("color:Gray");
           $row->style("background-color:#CCFF66");
       }
    });
    ...
```

datagrid supports also csv output, so it can be used as "report" tool.

```
   ...
   $grid->add('title','Title');
   $grid->add('body','Body')
   ...
   $grid->buildCSV();  //  force download
   $grid->buildCSV('export_articles', 'Y-m-d.His');  // force download with custom stamp
   $grid->buildCSV('uploads/filename', 'Y-m-d');  // write on file
    ...
    $grid->buildCSV('uploads/filename', 'Y-m-d', false); // without sanitize cells

    $as_excel = ['delimiter'=>',', 'enclosure'=>'"', 'line_ending'=>"\n"];
    $grid->buildCSV('uploads/filename', 'Y-m-d', true, $as_excel); // with customizations

```

DataForm
--------

[](#dataform)

DataForm is a form builder, you can add fields, rules and buttons.
It will build a bootstrap form, on submit it will check rules and if validation pass it'll store new entity.

```
   //start with empty form to create new Article
   $form = \DataForm::source(new Article);

   //or find a record to update some value
   $form = \DataForm::source(Article::find(1));

   //add fields to the form
   $form->add('title','Title', 'text'); //field name, label, type
   $form->add('body','Body', 'textarea')->rule('required'); //validation

   //some enhanced field (images, wysiwyg, autocomplete, maps, etc..):
   $form->add('photo','Photo', 'image')->move('uploads/images/')->preview(80,80);
   $form->add('body','Body', 'redactor'); //wysiwyg editor
   $form->add('author.name','Author','autocomplete')->search(['firstname','lastname']);
   $form->add('categories.name','Categories','tags'); //tags field
   $form->add('map','Position','map')->latlon('latitude','longitude'); //google map

   //you can also use now the smart syntax for all fields:
   $form->text('title','Title'); //field name, label
   $form->textarea('body','Body')->rule('required'); //validation

   //change form orientation
   $form->attributes(['class'=>'form-inline']);

   ...

   $form->submit('Save');
   $form->saved(function() use ($form)
   {
        $form->message("ok record saved");
        $form->link("/another/url","Next Step");
   });

   view('article', compact('form'))
```

```
   #article.blade.php

  {!! $form !!}
```

[DataForm explained](https://github.com/zofe/rapyd-laravel/wiki/DataForm)

### customize form in view

[](#customize-form-in-view)

You can directly customize form using build() in your controller

```
    ...
    $form->build();
    view('article', compact('form'))
```

then in the view you can use something like this:

```
   #article.blade.php
    {!! $form->header !!}

        {!! $form->message !!}

        @if(!$form->message)

                     {!! $form->render('title') !!}

                    {!! $form->render('body') !!}

            ...
        @endif

    {!! $form->footer !!}
```

[custom form layout explained](https://github.com/zofe/rapyd-laravel/wiki/Custom-Form-Layout)
[custom form layout demo](http://www.rapyd.com/rapyd-demo/styledform)

DataEdit
--------

[](#dataedit)

DataEdit extends DataForm, it's a full CRUD application for given Entity.
It has status (create, modify, show) and actions (insert, update, delete) It detect status by simple query string semantic:

```
  /dataedit/uri                     empty form    to CREATE new records
  /dataedit/uri?show={record_id}    filled output to READ record (without form)
  /dataedit/uri?modify={record_id}  filled form   to UPDATE a record
  /dataedit/uri?delete={record_id}  perform   record DELETE
  ...

```

```
   //simple crud for Article entity
   $edit = \DataEdit::source(new Article);
   $edit->link("article/list","Articles", "TR")->back();
   $edit->add('title','Title', 'text')->rule('required');
   $edit->add('body','Body','textarea')->rule('required');
   $edit->add('author.name','Author','autocomplete')->search(['firstname','lastname']);

   //you can also use now the smart syntax for all fields:
   $edit->textarea('title','Title');
   $edit->autocomplete('author.name','Author')->search(['firstname','lastname']);

   return $edit->view('crud', compact('edit'));
```

```
   #crud.blade.php

  {!! $edit !!}
```

[DataEdit explained](https://github.com/zofe/rapyd-laravel/wiki/DataEdit)

DataFilter
----------

[](#datafilter)

DataFilter extends DataForm, each field you add and each value you fill in that form is used to build a **where clause** (by default using 'like' operator).
It should be used in conjunction with a DataSet or DataGrid to filter results.
It also support query scopes (see eloquent documentation), closures, and a cool DeepHasScope trait see samples:

```
   $filter = \DataFilter::source(new Article);

   //simple like
   $filter->add('title','Title', 'text');

   //simple where with exact match
   $filter->add('id', 'ID', 'text')->clause('where')->operator('=');

   //custom query scope, you can define the query logic in your model
   $filter->add('search','Search text', 'text')->scope('myscope');

   //cool deep "whereHas" (you must use DeepHasScope trait bundled on your model)
   //this can build a where on a very deep relation.field
   $filter->add('search','Search text', 'text')->scope('hasRel','relation.relation.field');

   //closure query scope, you can define on the fly the where
   $filter->add('search','Search text', 'text')->scope( function ($query, $value) {
         return $query->whereIn('field', ["1","3",$value]);
   })

   $filter->submit('search');
   $filter->reset('reset');

   $grid = \DataGrid::source($filter);
   $grid->add('nome','Title', true);
   $grid->add('{{ substr($body,0,20) }}...','Body');
   $grid->paginate(10);

   view('articles', compact('filter', 'grid'))
```

```
   # articles.blade

   {!! $filter !!}
   {!! $grid !!}
```

[DataFilter explained](https://github.com/zofe/rapyd-laravel/wiki/DataFilter)
[Custom layout and custom query scope](http://www.rapyd.com/rapyd-demo/customfilter)

DataTree
--------

[](#datatree)

The DataTree extends the DataGrid, and displays sortable tree widget. It supports all the methods of the DataGrid with the exception of pagination and sorting. Another difference is you need to pass in an already loaded Baum Model, not an empty Model or Query Builder.

To use this widget you need to `php composer.phar require baum/baum` and make sure your model extends `Baum\Node`.

```
    // the root node won't appear, only its sub-nodes will be displayed.
    $root = Menu::find(1) or App::abort(404);

    $tree = \DataTree::source($root);
    $tree->add('title');
    $tree->edit("/menu/edit", 'Edit', 'modify|delete');
    $tree->submit('Save the order');
    return view('menu-list', compact('tree'));
```

Namespace consideration, Extending etc.
---------------------------------------

[](#namespace-consideration-extending-etc)

To use widgets you can:

- just use the global aliases: `\DataGrid::source()...` (please note the '')
- or import facades:

```
    use Zofe\Rapyd\Facades\DataSet;
    use Zofe\Rapyd\Facades\DataGrid;
    use Zofe\Rapyd\Facades\DataForm;
    use Zofe\Rapyd\Facades\DataForm;
    use Zofe\Rapyd\Facades\DataEdit;
    ..
    DataGrid::source()...
```

- or you can extend each class

```
    Class MyDataGrid extends Zofe\Rapyd\DataGrid\DataGrid {
    ...
    }
    Class MyDataEdit extends Zofe\Rapyd\DataEdit\DataEdit {
    ...
    }
    ..
    MyDataGrid::source()
```

Publish &amp; override configuration and assets
-----------------------------------------------

[](#publish--override-configuration-and-assets)

You can quickly publish the configuration file (to override something) by running the following Artisan command.

```
$ php artisan vendor:publish

```

You need also to add this to your views, to let rapyd add runtime assets:

```

...

{!! Rapyd::head() !!}

```

note: widget output is in standard with **Boostrap 3+**, and some widget need support of **JQuery 1.9+**so be sure to include dependencies as above

A better choice is to split css and javascipts and move javascript at bottom, just before body to speedup the page, you can do this with:

```

  ...

{!! Rapyd::styles() !!}

....

   {!! Rapyd::scripts() !!}

```

In short
--------

[](#in-short)

Rapyd use a "widget" approach to make a crud, without "generation". (this approach is worst in terms of flexibility but fast/rapid in terms of development and maintenance):

*You need to "show" and "edit" record from an entity?*
Ok so you need a DataGrid and DataEdit. You can build widgets where you want (even multiple widgets on same route). An easy way to work with rapyd is:

- make a route to a controller for each entity you need to manage
- make the controller with one method for each widget (i.e.: one for a datagrid and one for a dataedit)
- make an empty view, include bootstrap and display content that rapyd will build for you

Rapyd comes with demo (controller, models, views) a route is defined in `app/Http/rapyd.php`
so go to:

/rapyd-demo

License
-------

[](#license)

Rapyd is licensed under the [MIT license](http://opensource.org/licenses/MIT)

###  Health Score

32

—

LowBetter than 71% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

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

Recently: every ~31 days

Total

87

Last Release

3391d ago

Major Versions

1.3.24 → 2.0.02015-02-14

1.3.28 → 2.0.62015-04-18

1.3.34 → 2.0.82015-05-15

1.3.36 → 2.0.112015-08-07

PHP version history (2 changes)1.0.0PHP &gt;=5.3.0

2.0.0PHP &gt;=5.4.0

### Community

Maintainers

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

---

Top Contributors

[![zofe](https://avatars.githubusercontent.com/u/261951?v=4)](https://github.com/zofe "zofe (690 commits)")[![icedfish](https://avatars.githubusercontent.com/u/1222861?v=4)](https://github.com/icedfish "icedfish (23 commits)")[![tacone](https://avatars.githubusercontent.com/u/659801?v=4)](https://github.com/tacone "tacone (18 commits)")[![SCIF](https://avatars.githubusercontent.com/u/671925?v=4)](https://github.com/SCIF "SCIF (13 commits)")[![mattglover11](https://avatars.githubusercontent.com/u/8943960?v=4)](https://github.com/mattglover11 "mattglover11 (8 commits)")[![zhwei](https://avatars.githubusercontent.com/u/1446459?v=4)](https://github.com/zhwei "zhwei (5 commits)")[![rudignet](https://avatars.githubusercontent.com/u/2227935?v=4)](https://github.com/rudignet "rudignet (4 commits)")[![ShrwdFlrst](https://avatars.githubusercontent.com/u/1634863?v=4)](https://github.com/ShrwdFlrst "ShrwdFlrst (4 commits)")[![hamishguthrie](https://avatars.githubusercontent.com/u/11741989?v=4)](https://github.com/hamishguthrie "hamishguthrie (4 commits)")[![mshahamirian](https://avatars.githubusercontent.com/u/2095860?v=4)](https://github.com/mshahamirian "mshahamirian (3 commits)")[![antongorodezkiy](https://avatars.githubusercontent.com/u/580599?v=4)](https://github.com/antongorodezkiy "antongorodezkiy (3 commits)")[![jpclair](https://avatars.githubusercontent.com/u/5188100?v=4)](https://github.com/jpclair "jpclair (2 commits)")[![JamesGuthrie](https://avatars.githubusercontent.com/u/1117749?v=4)](https://github.com/JamesGuthrie "JamesGuthrie (2 commits)")[![coupej](https://avatars.githubusercontent.com/u/912039?v=4)](https://github.com/coupej "coupej (2 commits)")[![shadywallas](https://avatars.githubusercontent.com/u/1280858?v=4)](https://github.com/shadywallas "shadywallas (2 commits)")[![fasthold](https://avatars.githubusercontent.com/u/174880?v=4)](https://github.com/fasthold "fasthold (2 commits)")[![TBarina](https://avatars.githubusercontent.com/u/13364322?v=4)](https://github.com/TBarina "TBarina (2 commits)")[![viko16](https://avatars.githubusercontent.com/u/5064777?v=4)](https://github.com/viko16 "viko16 (2 commits)")[![davidjoan](https://avatars.githubusercontent.com/u/146379?v=4)](https://github.com/davidjoan "davidjoan (2 commits)")[![gitter-badger](https://avatars.githubusercontent.com/u/8518239?v=4)](https://github.com/gitter-badger "gitter-badger (1 commits)")

---

Tags

laravelcrudformbackendadmindatatableadministratorRapyd

### Embed Badge

![Health badge](/badges/simexis-rapyd/health.svg)

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

###  Alternatives

[serverfireteam/panel

Admin panel for Laravel applications

42532.2k2](/packages/serverfireteam-panel)[laravelrus/sleepingowl

Administrative interface builder for Laravel.

810219.6k3](/packages/laravelrus-sleepingowl)[serverfireteam/blog

A nice blog system with laravel and laravelpanel

523.1k](/packages/serverfireteam-blog)

PHPackages © 2026

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