Download the PHP package writecl/rapyd without Composer
On this page you can find all versions of the php package writecl/rapyd. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download writecl/rapyd
More information about writecl/rapyd
Files in writecl/rapyd
Package rapyd
Short Description crud widgets for laravel, to make an admin in few lines of code
License
Homepage https://github.com/writecl/rapyd-laravel
Informations about the package rapyd
rapyd-laravel
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.
Documentation: Wiki
Install in Laravel 5.6, .. 5.2, 5.1, 5.0, 4.*
require the package in your Laravel >= 5.6
$ composer require writecl/rapyd
then publish assets:
$ php artisan vendor:publish
you can also require a specific version:
writecl/rapyd:"2.2.*"
for Laravel 5.2
writecl/rapyd:"2.1.*"
for Laravel 5.1
writecl/rapyd:"2.0.*"
for Laravel 5.0
note: for Laravel <=5.4 you need to add the provider in your config/app.php:
Writecl\Rapyd\RapydServiceProvider::class
A couple of minutes of your time before you start
I came from an era where there was mutual appreciation among programmers, if you use this library and benefit from it join-me on Linkedin and write a short review.
Thanks to Mihai Berende for having done it already
me@linkedin
DataSet
DataSet is a simple presenter, it build a super-collection, a pagination and orderby links. You can start from tablename, a query, a model, o just an array.
in a controller
in a view you can just write
DataGrid
DataGrid extend 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
in a view you can just write
styling a datagrid
datagrid supports also csv output, so it can be used as "report" tool.
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.
customize form in view
You can directly customize form using build() in your controller
then in the view you can use something like this:
custom form layout explained
custom form layout demo
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:
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:
DataFilter explained
Custom layout and custom query scope
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
.
Namespace consideration, Extending etc.
To use widgets you can:
- just use the global aliases:
\DataGrid::source()...
(please note the '\') -
or import facades:
- or you can extend each class
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:
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:
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 & Contacts
Rapyd is licensed under the MIT license
Please join me and review my work on Linkedin
thanks
All versions of rapyd with dependencies
laravelcollective/html Version ^6.1
intervention/image Version 2.4.2
writecl/burp Version ^4