Download the PHP package earlybirdmvp/foundry without Composer
On this page you can find all versions of the php package earlybirdmvp/foundry. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download earlybirdmvp/foundry
More information about earlybirdmvp/foundry
Files in earlybirdmvp/foundry
Package foundry
Short Description A simple but powerful CRUD tool for Laravel
License Apache-2.0
Homepage https://github.com/earlybirdmvp/foundry
Informations about the package foundry
foundry
Easily perform CRUD tasks on Eloquent models
This is a replacement for Laravel's Resource Controllers, which are very lightweight.
Installation
Add "earlybirdmvp/foundry" to your composer.json file and run composer update.
Then add these lines to your app/start/global.php file:
Getting Started
First create your Foundry model.
Then create a Controller:
Finally add a Route resource group. See http://laravel.com/docs/controllers#resource-controllers All of the "only", "except", etc. options can be used.
That's all!
Now you simply need to go to the URL product and you will see a paginated list of all Product objects. There is a button to create a new product, and columns with unique indexes link to edit the individual resource.
Features
- Works well with Bootstrap classes
- This is meant to be a CMS, not a DB admin tool. Therefore the Eloquent
$hiddenand$guardedarrays are respected and not visible or editable, respectively. - If a column name has a comment, that is shown instead (can be used to create user-friendly labels)
-
Supported data types:
- Validation is built in.
NOT NULLcolumns are considered "required", any column containing "email" inside its name must be a valid email address, and columns with unique indexes are checked - Validation errors are displayed next to the problematic input
-
Very basic
belongsTorelationships are supported. The column must end in_idand must have the same prefix as the name of the relationship. For example, if theproductstable has acategory_idcolumn, and this Eloquent relationship then it will work: - These
belongsTorelationships are shown as select dropdowns where the value is theidand the option text is thenameattribute. If the table does not have anamecolumn, or you wish to change what is displayed, you can use$appends:
Options
Controller
- Specify the model with
protected $model. Default is class name with "Controller" stripped off. - Set the number of items shown per page with
protected $per_page. Default 10. - If you wish to detect updates, create a
detectChangefunction. This is called beforesave()so that you can compare the old and new values
Todo
- sort and filter the index page
- support more data types
- improve validation for dates
- improve support for relationships
- delete resources
- bulk updates and deletes
- more flexible layout