2017 © Pedro Peláez
 

project monkyz

Dynamic and autonomous Administration Panel for Laravel 5

image

lab1353/monkyz

Dynamic and autonomous Administration Panel for Laravel 5

  • CSS
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 15 Versions
  • 1 % Grown

The README.md

Monkyz, (*1)

screenshot, (*2)

monkyz logo Monkyz :: dynamic admin panel

lab1353 Total Downloads Latest Stable Version Latest Unstable Version License, (*3)

Monkyz is a dynamic and autonomous Administration Panel for Laravel 5.2 ., (*4)

It adapts to existing database by creating a full CRUD management for any table existing. No configuration required: without writing a single line of code, your control panel is ready for use., (*5)

Table of Contents

Requirements

The requirements are:, (*6)

  • PHP >= 5.5.9
  • Laravel 5.2

Installation

First, pull in the package through Composer:, (*7)

php composer.phar require lab1353/monkyz

or, for the latest version, in development (it may not be stable):, (*8)

php composer.phar require lab1353/monkyz:dev-master

And then, within config/app.php, include the service provider:, (*9)

'providers' => [
    Lab1353\Monkyz\MonkyzServiceProvider::class,
];

Finally, publish the assets:, (*10)

php artisan vendor:publish --provider="Lab1353\Monkyz\MonkyzServiceProvider"

This command will publish:, (*11)

  • views in: resources/views/vendor/monkyz/
  • configuration files: config/
  • assets: public/vendor/monkyz/

General Informations

Assets Files

The file css/monkyz.min.css was generated by a SCSS file. If you are interested in changing the SCSS source files, you can find here: vendor/lab1353/monkyz/resources/assets/scss/., (*12)

The file public/vendor/monkyz/js/monkyz.min.js has been compressed. The original files are in: vendor/lab1353/monkyz/resources/assets/js/., (*13)

Tables Relationships

Relations between tables must follow directions imposed by Eloquent. For more information read the section Eloquent: Relationships, (*14)

Monkyz currently only supports one-to-one and many-to-one relationships., (*15)

Configuration

File monkyz.php

The file config/monkyz.php contains the configuration details of Monkyz:, (*16)

  • prefix: prefix of url for access at Monkyz
  • use_https (true|false): force chema https
  • use_auth (true|false): laravel authentication, otherwise access to panel is automatically
  • cache_minutes: minutes of duration of cache
  • path_public_temp: folder name, in public path, for temporary files
  • vendors: array for define vendors assets version

File monkyz-tables.php

The file config/monkyz-tables.php contains parameters for generate the dynamic configuration of the DB structure:, (*17)

  • input_from_type: array to find the relative input according to the field type defined on the database
  • input_from_name: array to find the relative input according to the name of field
  • fields_name_hide_in_edit: array of field's name that will be hidden in edit (such as: created_at, updated_at, deleted_at)
  • tables: view the details

This file can be automatically generated with the artisan command monkyz:generate-db, (*18)

Parameter tables

The tables parameter are the ovveride array of dynamic DB structure:, (*19)

'table_name'    => [    // name of table in db
    'title' => 'Table',
    'icon'  => 'fa fa-table fa-fw',
    'visible'   => true,
  'ajax_list' => false,
    'fields'    => [
        'field_name'    => [    // name of field in db
            'title' => 'Column',
      'input' => 'text',
            'order' => 'asc',
            'in_list'   => true,
            'in_edit'   => true,
            'enum'  => [
                'attr'  => 'value'
            ]
            'file'  => [
                'disk'  => 'local',
                'path'  => 'uploads/',
                'overwrite' => true,
                'resize'    => false,
                'resize_height_px'  => 1000,
                'resize_width_px'   => 1000,
            ],
            'relation'  => [
                'table' => 'table2',
                'field_value'   => 'id',
                'field_text'    => 'name',
            ],
            'attributes'    => [
                'attr'  => 'value'
            ]
        ]
    ]
],
Table parameters
  • title: title of table
  • icon: the fontawesome icon
  • visible (true|false): visibility of table in the sidebar menù
  • ajax_list (true|false): defines whether to activate the ajax paging and filtering
  • fields: list of fields in table
Fields parameters
  • title: title of column
  • input: The values for this parameter are:
    • block: the <pre> block to display formatted text
    • checkbox: checkbox true/false
    • color: hex color selector (for details see: W3C HTML Forms)
    • date: only date tag (for details see: W3C HTML Forms)
    • datetime: date and time (for details see: W3C HTML Forms)
    • editor: a simple wysiwyg editor (used Bootstrap3 Wysiwyg)
    • enum: select box for enum (mandatory to define the parameter enum)
    • file: file upload (mandatory to define the parameter file)
    • hidden: field hidden used, by default, to the key fields
    • image: file upload for only image (accepted extensions: .jpg, .jpeg, .png) (mandatory to define the parameter file)
    • number: number tag (for details see: W3C HTML Forms)
    • relation: select box with the relation with another table (mandatory to define the parameter relation)
    • tel: telephone number (for details see: W3C HTML Forms)
    • text: text tag for string
    • textarea: textarea tag
    • url: url tag (for details see: W3C HTML Forms)
    • (You can create your own custom fields)
  • order: (null|asc|desc) defines the default table sorting
  • in_list (true|false): visibility in list
  • in_edit (true|false): visibility in edit and add record
  • enum: array 'key' => 'value' for populate the select box
  • file: file/image field details
    • disk: disk name for Storage class, configured in config files filesystems.php (for more info see Laravel Filesystem Documentation). If no one is indicated, it takes the default disk.
    • path: relative path of images uploaded
    • overwrite (true|false): overwrite the file if it already exists
    • resize (true|false): if field is a image, determines if the uploaded image will be resized
    • resize_height_px: pixel in height for resize image
    • resize_width_px: pixel in width for resize image
  • relation: relationship field details
    • table: name of relationship's table
    • field_value: name of value field of relationship's table
    • field_text: name of text field of relationship's table
  • attributes: array ('key' => 'value') of extra attributes in input

In automatically search for the type of the field input, it is to be more important to the input_from_name parameter rather than a input_from_type., (*20)

!!! ATTENTION !!! Monkyz currently only supports one-to-one and many-to-one relationships. All tables of many-to-many relationship will have to be defined in config file monkyz-tables.php and setting the parameter visible to false., (*21)

Authentication

You can decide whether or not to use authentication to access the administration panel. You can define it with use_auth parameter in the configuration file monkyz.php., (*22)

If use_auth parameters is true, Monkyz uses Laravel authentication. If you want to use auth, you can run artisan command php artisan make:auth., (*23)

Otherwise, if use_auth is false, the access to Monkyz is automatic., (*24)

Artisan Commands

monkyz:tables

Monkyz provides the artisan command:, (*25)

php artisan monkyz:tables

This command allows you to automatically fill in the monkyz-tables.php config file., (*26)

It will automatically create all the necessary references to Monkyz for the db structure. Not overwrite already entered parameters: only add the parameters have not been set., (*27)

Customize

Custom Fields

Monkyz allows the creation of types of custom fields in the edit page of the record., (*28)

To create it, follow these steps:, (*29)

1) If you have not already done so, to publish the views:, (*30)

php artisan vendor:publish --provider="Lab1353\Monkyz\Providers\MonkyzServiceProvider"

The following command will be published the views files in: /resources/views/vendor/monkyz, (*31)

2) Go to the resources/views/vendor/monkyz/ folder and create a new file blade, appointing him as your new field (for example: custom):, (*32)

cd resources/views/vendor/monkyz
touch custom.blade.php

You can add css references using the section css:, (*33)

@section('css')
  @parent

  <link rel="stylesheet" href="..." />
@endsection

or js with the section scripts:, (*34)

@section('scripts')
  @parent

  
@endsection

3) Edit the new file as you prefer. Know that, the view, the following variables are passed:, (*35)

  • $field: name of database column
  • $record: the Eloquent Model (to retrieve the value of the field then use: $record->$field)
  • $params: array of field parameters

4) Now you can use your personal type of field, setting the parameter of the input fields:, (*36)

'table_name'    => [    // name of table in db
    'fields'    => [
        'field_name'    => [    // name of field in db
            'input' => 'custom',    // <-- change 'custom' with your custom field name

Google Analytics

In the dashboard, you can view the statistics taken from Google Analytics., (*37)

Monkyz used spatie/laravel-analytics package that requires a particular configuration to be able to retrieve data from Google Analytics., (*38)

You have to follow the official guide to create the file storage/app/laravel-google-analytics/service-account-credentials.json. Once you create the file, set the viewId parameter in the Settings page., (*39)

Troubleshooting

To report a issues, use GitHub Issues., (*40)

For help with common problems, see ISSUES.md., (*41)

Change Log

Please see CHANGELOG.md for more information what has changed recently., (*42)

Into The Future

  • compatibility with Laravel 5.4
  • import/export configurations
  • manage useSoftDelete in model
  • roles for access sections
  • Laravel validation rules for fields
  • multi files uploads

Credits

Vendors

Monkyz was made using the following css/js:, (*43)

All vendors files are loaded in CDN., (*44)

Tools

Monkyz was written by Daniele Montecchi of lab1353., (*45)

Monkyz is released under the MIT License. See the LICENSE.md file for details., (*46)

The Versions

27/10 2017

dev-master

9999999-dev http://1353.it

Dynamic and autonomous Administration Panel for Laravel 5

  Sources   Download

MIT

The Requires

 

by Daniele Montecchi

laravel crud admin administrator laravel5 panel dynamic autonomous

26/09 2017

1.0.13

1.0.13.0 http://1353.it

Dynamic and autonomous Administration Panel for Laravel 5

  Sources   Download

MIT

The Requires

 

by Daniele Montecchi

laravel crud admin administrator laravel5 panel dynamic autonomous

26/09 2017

1.0.12

1.0.12.0 http://1353.it

Dynamic and autonomous Administration Panel for Laravel 5

  Sources   Download

MIT

The Requires

 

by Daniele Montecchi

laravel crud admin administrator laravel5 panel dynamic autonomous

30/08 2017

1.0.11

1.0.11.0 http://1353.it

Dynamic and autonomous Administration Panel for Laravel 5

  Sources   Download

MIT

The Requires

 

by Daniele Montecchi

laravel crud admin administrator laravel5 panel dynamic autonomous

18/08 2017

1.0.10

1.0.10.0 http://1353.it

Dynamic and autonomous Administration Panel for Laravel 5

  Sources   Download

MIT

The Requires

 

by Daniele Montecchi

laravel crud admin administrator laravel5 panel dynamic autonomous

08/06 2017

1.0.9

1.0.9.0 http://1353.it

Dynamic and autonomous Administration Panel for Laravel 5

  Sources   Download

MIT

The Requires

 

by Daniele Montecchi

laravel crud admin administrator laravel5 panel dynamic autonomous

07/06 2017

1.0.8

1.0.8.0 http://1353.it

Dynamic and autonomous Administration Panel for Laravel 5

  Sources   Download

MIT

The Requires

 

by Daniele Montecchi

laravel crud admin administrator laravel5 panel dynamic autonomous

16/03 2017

1.0.7

1.0.7.0 http://1353.it

Dynamic and autonomous Administration Panel for Laravel 5

  Sources   Download

MIT

The Requires

 

by Daniele Montecchi

laravel crud admin administrator laravel5 panel dynamic autonomous

13/12 2016

1.0.6

1.0.6.0 http://1353.it

Dynamic and autonomous Administration Panel for Laravel 5

  Sources   Download

MIT

The Requires

 

by Daniele Montecchi

laravel crud admin administrator laravel5 panel dynamic autonomous

18/11 2016

1.0.5

1.0.5.0 http://1353.it

Dynamic and autonomous Administration Panel for Laravel 5

  Sources   Download

MIT

The Requires

 

by Daniele Montecchi

laravel crud admin administrator laravel5 panel dynamic autonomous

18/11 2016

1.0.4

1.0.4.0 http://1353.it

Dynamic and autonomous Administration Panel for Laravel 5

  Sources   Download

MIT

The Requires

 

by Daniele Montecchi

laravel crud admin administrator laravel5 panel dynamic autonomous

03/11 2016

1.0.3

1.0.3.0 http://1353.it

Dynamic and autonomous Administration Panel for Laravel 5

  Sources   Download

MIT

The Requires

 

by Daniele Montecchi

laravel crud admin administrator laravel5 panel dynamic autonomous

24/10 2016

1.0.2

1.0.2.0

Dynamic and autonomous Administration Panel for Laravel 5

  Sources   Download

MIT

The Requires

 

by Daniele Montecchi

laravel crud admin laravel5 panel dynamic autonomous

10/10 2016

1.0.1

1.0.1.0

Dynamic and autonomous Administration Panel for Laravel 5

  Sources   Download

MIT

The Requires

 

by Daniele Montecchi

laravel crud admin laravel5 panel dynamic autonomous

10/10 2016

1.0.0

1.0.0.0

Dynamic and autonomous Administration Panel for Laravel 5

  Sources   Download

MIT

The Requires

 

by Daniele Montecchi

laravel crud admin laravel5 panel dynamic autonomous