2017 © Pedro Peláez
 

library monkey-tables

monkeyTables is a simple package, to allow you to create powerful tables

image

designitgmbh/monkey-tables

monkeyTables is a simple package, to allow you to create powerful tables

  • Friday, March 16, 2018
  • by espspinix
  • Repository
  • 9 Watchers
  • 0 Stars
  • 351 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 9 Versions
  • 1 % Grown

The README.md

monkeyTables

monkeyTables are a set of PHP and JavaScript libraries with the necessary styling, to provide you with a simple and effective package, that will allow you to create powerful tables directly made from your database. It brings a lot of nice features including - automatic filtering - sorting - presets - inline editing - tabbing - and much more.., (*1)

Installation

To install the package, you just let composer do the work for you:
composer.phar require "designitgmbh/monkey-tables":"dev-master", (*2)

User model

Because we offer presets, which are unique per user and can be restricted, monkeyTables need to access a User Model, which has a relation to a profile from MonkeyAccess., (*3)

<?php

namespace App\Models;

class User extends SystemUser {
    public function profile()
    {
        return $this->belongsTo('Designitgmbh\MonkeyAccess\Models\Profile', 'profile_id');
    }
}

Lumen

This package is compatible with Lumen, but you will have to do some minimal changes:, (*4)

  1. Enable Facades
  2. Enable Eloquent
  3. Install larasupport: https://github.com/irazasyed/larasupport

Usage

Backend

In a controller, you can build up your table, and send it back as JSON., (*5)

$mTable = new mTable;
$mTable
    ->setRequest(Request::all())
    ->source('Project');

$mTable->add(
    (new mTableColumn("#", "id"))
)->add(
    (new mTableColumn("Name", "name"))
        ->setClickable("/project/{{ID}}", "id")     
)->add(
    (new mTableColumn("Department", "department->name"))
        ->setClickable("/department/{{ID}}", "department->id")
)->add(
    (new mTableColumn("Unit", "unit->name"))
        ->setClickable("/unit/{{ID}}", "unit->id")
);

return response()->json($mTable->render());

Don't forget to add a route to the controller., (*6)

$app->post('/project/indexList', 'ProjectController@indexList');

Frontend

After including all dependencies, you just need to add a div, which will hold the table, and a small javascript snippet., (*7)



The Versions

16/03 2018

dev-master

9999999-dev https://github.com/designitgmbh/monkeyTables

monkeyTables is a simple package, to allow you to create powerful tables

  Sources   Download

BSD BSD-3-Clause

The Requires

 

designitgmbh monkeytables

10/01 2018

dev-ppa-12624-fixing-auto-date-interval-for-reports

dev-ppa-12624-fixing-auto-date-interval-for-reports https://github.com/designitgmbh/monkeyTables

monkeyTables is a simple package, to allow you to create powerful tables

  Sources   Download

BSD

The Requires

 

designitgmbh monkeytables

06/09 2017

dev-spa-total-query

dev-spa-total-query https://github.com/designitgmbh/monkeyTables

monkeyTables is a simple package, to allow you to create powerful tables

  Sources   Download

BSD

The Requires

 

designitgmbh monkeytables

30/08 2017

dev-spa-totals

dev-spa-totals https://github.com/designitgmbh/monkeyTables

monkeyTables is a simple package, to allow you to create powerful tables

  Sources   Download

BSD

The Requires

 

designitgmbh monkeytables

25/08 2017

dev-ppa-totals

dev-ppa-totals https://github.com/designitgmbh/monkeyTables

monkeyTables is a simple package, to allow you to create powerful tables

  Sources   Download

BSD

The Requires

 

designitgmbh monkeytables

15/06 2017

dev-spa-branch

dev-spa-branch https://github.com/designitgmbh/monkeyTables

monkeyTables is a simple package, to allow you to create powerful tables

  Sources   Download

BSD

The Requires

 

designitgmbh monkeytables

22/05 2017

dev-spa-fix

dev-spa-fix https://github.com/designitgmbh/monkeyTables

monkeyTables is a simple package, to allow you to create powerful tables

  Sources   Download

BSD

The Requires

 

designitgmbh monkeytables

11/11 2016

dev-FSI_changes_for_oReport

dev-FSI_changes_for_oReport https://github.com/designitgmbh/monkeyTables

monkeyTables is a simple package, to allow you to create powerful tables

  Sources   Download

BSD

The Requires

 

designitgmbh monkeytables

26/07 2016

dev-multiple-pks-fix

dev-multiple-pks-fix https://github.com/designitgmbh/monkeyTables

monkeyTables is a simple package, to allow you to create powerful tables

  Sources   Download

BSD

The Requires

 

designitgmbh monkeytables