dev-master
9999999-devA simple File Manager package for Laravel 5
MIT
The Requires
- php >=5.4.0
- illuminate/config ~5
- illuminate/support ~5
by James Augustus Zuccon
A simple File Manager package for Laravel 5
Add this library to your composer.json file: "jimtendo/jazzycrud": "dev-master"
, (*1)
Add Service Provider to config/app.php
: 'Jimtendo\JazzyCRUD\ServiceProvider'
, (*2)
Make sure the following libraries are included in your main layout file:, (*3)
<script type="text/javascript" language="javascript" src="//code.jquery.com/jquery-1.10.2.min.js"></script> <link rel="stylesheet" type="text/css" href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="//cdn.datatables.net/plug-ins/9dcbecd42ad/integration/bootstrap/3/dataTables.bootstrap.css"> <script type="text/javascript" language="javascript" src="//cdn.datatables.net/1.10.4/js/jquery.dataTables.min.js"></script> <script type="text/javascript" language="javascript" src="//cdn.datatables.net/plug-ins/9dcbecd42ad/integration/bootstrap/3/dataTables.bootstrap.js"></script>
Use like follows:, (*4)
$crud = new \Jimtendo\JazzyCRUD\Basic; $crud = $crud->from('feeds') ->lists(['id'=>'id', 'url'=>'url']) ->creates(['id'=>'id', 'url'=>'url']) ->shows(['id'=>'id', 'url'=>'url']) ->edits(['id'=>'id', 'url'=>'url']) ->titles(['id'=>'Id', 'url'=>'URL']) ->customize('url', function($value){ return $value . 'hello'; }) ->render(); echo $crud;
This doesn't support joins
. In future, should all columns be formatted thusly: tableName['field']
?, (*5)
Would we be able to add custom handlers if the tableName
cannot be found by doing it this way? i.e. If we're querying an API?, (*6)
Also, another thing that might be worth doing is making the 'actions' themselves hooks., (*7)
e.g. In constructor: $this->handleAction('list', $this->performList)
, (*8)
This would allow a user to over-ride any particular action., (*9)
Should field-types also be hooks? I.e. $this->handleType('imageUpload', $this->handleImageUpload);
, (*10)
A simple File Manager package for Laravel 5
MIT