Skip to content

jyyblue/wmi

Repository files navigation

WMI Admin Template [![Tweet]

Please help us on. Thanks in advance!

This is meant to be the UX game changer. Pure & transparent code is devoid of redundant components, so the app is light enough to offer ultimate user experience. This means mobile devices also, where the navigation is just as easy and intuitive as on a desktop or laptop. The CoreUI Layout API lets you customize your project for almost any device – be it Mobile, Web or WebApp.

Table of Contents

Versions

WMI is built on top of Bootstrap 4.

Installation

# clone the repo
$ git clone https://github.com/jyyblue/wmi.git

# install app's dependencies
$ composer install

# install app's dependencies
$ npm install

If you choice to use MySQL

Copy file ".env.example", and change its name to ".env". Then in file ".env" complete this database configuration:

  • DB_CONNECTION=mysql
  • DB_HOST=127.0.0.1
  • DB_PORT=3306
  • DB_DATABASE=laravel
  • DB_USERNAME=root
  • DB_PASSWORD=

Set APP_URL

If your project url looks like: example.com/sub-folder Then go to wmi/.env And modify this line:

  • APP_URL =

To make it look like this:

Next step

# in your app directory
# generate laravel APP_KEY
$ php artisan key:generate

# run database migration and seed
$ php artisan migrate:refresh --seed

# generate mixing
$ npm run dev

# and repeat generate mixing
$ npm run dev

Usage

# start local server
$ php artisan serve

# test
$ php vendor/bin/phpunit

Open your browser with address: localhost:8000
Click "Notes" on topbar menu and log in with credentials:

This user has roles: user and admin

  • Role user is required for notes management.
  • Role admin is required for users management.

How to add a link to the sidebar:

Instructions for CoreUI Free Laravel admin template only. Pro and Vue.js versions have separate instructions.

To add a link to the sidebar - modify seeds file:

wmi/database/seeds/MenusTableSeeder.php

In run() function - add insertLink():

$id = $this->insertLink( $rolesString, $visibleName, $href, $iconString);
  • $rolesString - a string with list of user roles this menu element will be available, ex. "guest,user,admin"
  • $visibleName - a string caption visible in sidebar
  • $href - a href, ex. /homepage or http://localhost:8000/dashboard
  • $iconString - a string containing valid CoreUI Icon name (kebab-case), ex. cui-speedometer or cui-star

To add a title to the sidebar - use function insertTitle():

$id = $this->insertTitle( $rolesString, $title );
  • $rolesString - a string with list of user roles this menu element will be available, ex. "guest,user,admin"
  • $title - a string caption visible in sidebar

To add a dropdown menu to the sidebar - use function beginDropdown():

$id = $this->beginDropdown( $rolesString, $visibleName, $iconString);
  • $rolesString - a string with list of user roles this menu element will be available, ex. "guest,user,admin"
  • $visibleName - a string caption visible in sidebar
  • $iconString - a string containing valid CoreUI icon name (kebab-case). For example: cui-speedometer or cui-star

To end dropdown section - use function endDropdown().

To add link to dropdown call function insertLink() between function calls beginDropdown() and endDropdown(). Example:

$id = $this->beginDropdown('guest,user,admin', 'Some dropdown', 'cui-puzzle');
$id = $this->insertLink('guest,user,admin', 'Dropdown name', 'http://example.com');
$this->endDropdown();

IMPORTANT - At the end of run() function, call joinAllByTransaction() function:

$this->joinAllByTransaction();

Once done with seeds file edit, run:

$ php artisan migrate:refresh --seed
# This command also rollbacks database and migrates it again.

Features

Table of contents:

Notes

It is an example of data presentation in a pagination table, and CRUD functionality.

Users

It is a simple example of how to manage registered users.

Menu management

It is a system that allows you to create a new menu and edit existing menus. To place a new menu named "new" in any view use this code:

        <?php
            use the App\MenuBuilder\FreelyPositionedMenus;
            if(isset($appMenus['new'])){
                FreelyPositionedMenus::render( $appMenus['new'] , '', 'your-css-class-of-ul-element');
            }
        ?>  

Manage menu items

Allows you to add, edit and delete menu items. To add a new menu item to the menu you must:

  • specify to which menu you are adding the item,
  • specify the roles of users for whom the item will be visible
  • name the item
  • type ( to choice: link, title and dropdown)
  • Href, the address to which the item is to refer,
  • Parent (To nest the item inside dropdown)
  • CORUI icons

Role management

Allows you to create, edit, delete and reorder user roles. When a user has more than one role, the highest hierarchical role is used to create a menu for him.

Manage media

It allows to:

  • Create virtual media folders.
  • Send media to applications.
  • Move media between folders,
  • Cut images,

BREAD system

BREAD stands for: browse, read, edit, add, delete. Our BREAD system allows you to easily and quickly generate for any table, from the database, a simple BREAD. To create a new BREAD just enter a table name from the database. Then enter a name for the form. Enter the number of rows in the browse table. Choose if you want the browse table to contain buttons: "show", "edit", "add", "delete". Assign roles for users who will be able to use the ready BREAD. Then complete each column of the table separately:

  • the column name visible to the user,
  • the input type for the column, The last step is to select the appropriate checkboxes:
  • browse (allows to display the column in the data table),
  • read (allows you to display the column in the show view,)
  • edit (enables column editing)
  • add (allows you to complete the column data when adding a record. Required if the column is not nullable). It is also possible to handle relationships with another table. If the column is a foreign key, it should be specified: in the field "Optional relation table name" - table name to which the foreign key refers, in the "Optional column name in relation table - to print" field - the name of the column that is in the relation table to be displayed. Finally, select one of the two "field types" that relate to the relation: 'relation select' or 'relation radio'.

E-mail Templates

It is an example of managing e-mail templates. Allows you to create, edit and delete templates. It also allows you to send an E-mail to a selected address.

Creators

Xiang Ming

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published