maxyc/laravel-adminlte-components

Laravel Blade Components For AdminLTE 3 Bootstrap 4 Admin Template

Installs: 16

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Language:JavaScript

Type:laravel-package

0.0.1 2021-02-23 12:53 UTC

This package is auto-updated.

Last update: 2024-08-23 20:36:49 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License Monthly Downloads Daily Downloads composer.lock

This package contains Laravel Blade Components for AdminLTE 3 free Boostrap admin panel UI Kit. Since, blade components are only available after Laravel 7, thus only laravel 7.x+ can use this package.

This package is fork from https://github.com/dgvai/laravel-adminlte-components/ . Fixed bugs and updated to php 8

Contents

Installation

You can install the package via composer:

    composer require maxyc/laravel-adminlte-components

Extract Plugins

    php artisan vendor:publish --tag=maxyc-adminlte-plugins

Configurations

You can use this package, stand alone with AdminLTE installed in your app. You just need to add an @yield('js') at the bottom of your master blade layout.

Or, if you use jeroennoten/Laravel-AdminLTE package, then you do not need to add anything at master. I will prefer to use this package.

Use this in the jeroennoten/Laravel-AdminLTE config:

        [
            'name' => 'AdminLTE-Components-Maxyc',
            'active' => true,
            'files' => [
                [
                    'type' => 'css',
                    'asset' => true,
                    'location' => '/vendor/adminlte-plugins/select2/css/select2.min.css',
                ],
                [
                    'type' => 'css',
                    'asset' => true,
                    'location' => '/vendor/adminlte-plugins/select2/css/select2-bootstrap4.min.css',
                ],
                [
                    'type' => 'js',
                    'asset' => true,
                    'location' => '/vendor/adminlte-plugins/select2/js/select2.min.js',
                ],
                [
                    'type' => 'js',
                    'asset' => true,
                    'location' => '/vendor/adminlte-plugins/bs-custom-file-input/bs-custom-file-input.min.js',
                ],
                [
                    'type' => 'js',
                    'asset' => true,
                    'location' => '/vendor/adminlte-plugins/moment/moment.min.js',
                ],
                [
                    'type' => 'css',
                    'asset' => true,
                    'location' => '/vendor/adminlte-plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css',
                ],
                [
                    'type' => 'js',
                    'asset' => true,
                    'location' => '/vendor/adminlte-plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js',
                ],
                [
                    'type' => 'css',
                    'asset' => true,
                    'location' => '/vendor/adminlte-plugins/summernote/summernote-bs4.css',
                ],
                [
                    'type' => 'js',
                    'asset' => true,
                    'location' => '/vendor/adminlte-plugins/summernote/summernote-bs4.min.js',
                ],
                [
                    'type' => 'css',
                    'asset' => true,
                    'location' => '/vendor/adminlte-plugins/bs-select/css/bootstrap-select.min.css',
                ],
                [
                    'type' => 'js',
                    'asset' => true,
                    'location' => '/vendor/adminlte-plugins/bs-select/js/bootstrap-select.min.js',
                ],
                [
                    'type' => 'css',
                    'asset' => true,
                    'location' => '/vendor/adminlte-plugins/bootstrap-tags-input/bootstrap-tagsinput.css',
                ],
                [
                    'type' => 'js',
                    'asset' => true,
                    'location' => '/vendor/adminlte-plugins/bootstrap-tags-input/bootstrap-tagsinput.js',
                ],
                [
                    'type' => 'js',
                    'asset' => true,
                    'location' => '/vendor/adminlte-plugins/daterangepicker/daterangepicker.js',
                ],
                [
                    'type' => 'css',
                    'asset' => true,
                    'location' => '/vendor/adminlte-plugins/daterangepicker/daterangepicker.css',
                ],
                [
                    'type' => 'css',
                    'asset' => true,
                    'location' => '/vendor/adminlte-plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css',
                ],
                [
                    'type' => 'js',
                    'asset' => true,
                    'location' => '/vendor/adminlte-plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js',
                ],
                [
                    'type' => 'css',
                    'asset' => true,
                    'location' => '/vendor/adminlte-plugins/bootstrap-slider/css/bootstrap-slider.min.css',
                ],
                [
                    'type' => 'js',
                    'asset' => true,
                    'location' => '/vendor/adminlte-plugins/bootstrap-slider/js/bootstrap-slider.min.js',
                ],
            ],
        ],

Components

Widgets

INFO BOX

Info Box
Info Box Full

MINIMUM USAGE

<x-adminlte-info-box title="Order" text="12" />

ALL AVAILABLE ATTRIBUTES

EXAMPLE

<x-adminlte-info-box bg="success" title="Yo title" text="123" icon="fas fa-star" :full="true" :grad="true"/>

DYNAMIC BINDINGS
Set id attibute, this will enable dynamic attributes for:

EXAMPLE

<x-adminlte-info-box bg="success" title="Users" text="100" icon="fas fa-star" :full="true" :grad="true" id="userbox" />

<script>
    $(()=>{
        $('#userbox-title').text('Users');
        $('#userbox-text').text('102');
    });
</script>

SMALL BOX

Small Box

MINIMUM USAGE

<x-adminlte-small-box title="New User" text="500" />

ALL AVAILABLE ATTRIBUTES

EXAMPLE

<x-adminlte-small-box title="Small box" text="500" bg="warning" url="#" urlText="See More" loading="false" />

DYNAMIC BINDINGS
Set id attibute, this will enable dynamic attributes for:

EXAMPLE

<x-adminlte-small-box title="Small box" text="500" bg="warning" url="#" urlText="See More" loading="false" id="userbox"/>

<script>
    $(()=>{
        $('#userbox-text').text('102');
        $('#userbox-link').attr('href',new.link);
    });
</script>

CARDS

Cards

MINIMUM USAGE

<x-adminlte-card title="Title">
    ...
</x-adminlte-card>

ALL AVAILABLE ATTRIBUTES

EXAMPLE

<x-adminlte-card title="Title" bg="primary" :outline="true" :full="true" :collapsed="false" :maximizable="true"           :removable="true" :disabled="false">
    ...
</x-adminlte-card>

ALERT

Alerts

MINIMUM USAGE

<x-adminlte-alert title="Alert!">
    This is alert
</x-adminlte-alert>

ALL AVAILABLE ATTRIBUTES

EXAMPLE

<x-adminlte-alert type="danger" title="Error!" :dismissable="true">
    This is alert
</x-adminlte-alert>

CALLOUT

Alerts

MINIMUM USAGE

<x-adminlte-callout>This is callout</x-adminlte-callout>

ALL AVAILABLE ATTRIBUTES

EXAMPLE

<x-adminlte-callout type="warning" title="Oops!">
    This is callout
</x-adminlte-callout>

PROGRESS

Alerts

MINIMUM USAGE

<x-adminlte-progress value="56"/>

ALL AVAILABLE ATTRIBUTES

EXAMPLE

<x-adminlte-progress value="56" bg="danger" size="sm" :stripped="true" :vertical="false"/>

PROFILE FLAT

Alerts

USAGE

<x-adminlte-profile-flat img="https://via.placeholder.com/150" name="Nadia Carmicheal" desc="Lead Developer">
    <x-adminlte-profile-flat-item title="Projects" text="31" url="#" badge="primary"/>
    <x-adminlte-profile-flat-item title="Tasks" text="5" />
    <x-adminlte-profile-flat-item title="Completed Projects" text="12" badge="success" />
    <x-adminlte-profile-flat-item title="Followers" text="842" badge="danger" />
</x-adminlte-profile-flat>

PROFILE WIDGET

Alerts

USAGE

<x-adminlte-profile-widget img="https://via.placeholder.com/150" name="Alexander Prince" desc="Founder CEO" bg="info">
    <x-adminlte-profile-widget-item title="followers" text="533"/>
    <x-adminlte-profile-widget-item title="sales" text="20" col="4"/>
    <x-adminlte-profile-widget-item title="inbox" text="0"/>
</x-adminlte-profile-widget>

<x-adminlte-profile-widget img="https://via.placeholder.com/150" name="Elizabeth Pierce" desc="Founder CEO" cover="https://via.placeholder.com/150">
    <x-adminlte-profile-widget-item title="followers" text="533"/>
    <x-adminlte-profile-widget-item title="sales" text="20" col="4"/>
    <x-adminlte-profile-widget-item title="inbox" text="0"/>
</x-adminlte-profile-widget>

MODAL

MINIMUM USAGE

<x-adminlte-modal id="login_modal" title="Modal Title">
    ...
</x-adminlte-modal>

ALL AVAILABLE ATTRIBUTES

EXAMPLE

<x-adminlte-modal id="login_modal" title="Modal Title" size="sm" :centered="true" index="1">
    ...
</x-adminlte-modal>

DATATABLE

MINIMUM USAGE

<x-adminlte-datatable id="sales-table" :heads="['#','Name','Phone','Actions']"/>
...

<script>
$(()=>{
   $('#sales-table').Datatable({
       ...
       ...
   });
});
</script>

ALL AVAILABLE ATTRIBUTES

ACKNOWLEDGEMENTS Use Dom : 'Blftrip' while using buttons. See Examples to be more clear!

Form Components

INPUT

USAGE

<x-adminlte-input />

ALL AVAILABLE ATTRIBUTES

INPUT-FILE

REQUIRES
bs-custom-file-input.min.js

USAGE

<x-adminlte-input-file />

ALL AVAILABLE ATTRIBUTES

INPUT-COLOR

REQUIRES
bootstrap-colorpicker

USAGE

<x-adminlte-input-color id="myID" />

ALL AVAILABLE ATTRIBUTES

INPUT-DATE

REQUIRES
tempusdominus-bootstrap-4

USAGE

<x-adminlte-input-date id="myID" />

ALL AVAILABLE ATTRIBUTES

DATE-RANGE

REQUIRES
datetimepicker

USAGE

<x-adminlte-date-range id="picker" callback="console.log('this is callback function')" />

ALL AVAILABLE ATTRIBUTES

* init
0 - Today
1 - Yesterday
2 - Last 7 Days
3 - Last 30 Days
4 - This Month
5 - Last Month

INPUT-SWITCH

REQUIRES
bootstrap-switch

USAGE

<x-adminlte-input-switch/>

ALL AVAILABLE ATTRIBUTES

INPUT-TAG

REQUIRES
bootstrap-tagsinput

USAGE

<x-adminlte-input-tag/>

ALL AVAILABLE ATTRIBUTES

INPUT-SLIDER

REQUIRES
bootstrap-slider

USAGE

<x-adminlte-input-slider id="myID"/>

ALL AVAILABLE ATTRIBUTES

SELECT

USAGE

<x-adminlte-select id="myID">
    <x-adminlte-option value="val">Text</x-adminlte-option>
</x-adminlte-select>

ALL AVAILABLE ATTRIBUTES: SELECT

ALL AVAILABLE ATTRIBUTES: OPTION

SELECT2

REQUIRES
select2

USAGE

<x-adminlte-select2 id="myID">
    <x-adminlte-option value="val">Text</x-adminlte-option>
</x-adminlte-select2>

ALL AVAILABLE ATTRIBUTES: SELECT

ALL AVAILABLE ATTRIBUTES: OPTION

SELECT-ICON

REQUIRES
bootstrap-select

USAGE

<x-adminlte-select-icon id="myID">
    <x-adminlte-option value="val" icon="true" content="fas fa-star">Text</x-adminlte-option>
</x-adminlte-select-icon>

ALL AVAILABLE ATTRIBUTES: SELECT

ALL AVAILABLE ATTRIBUTES: OPTION

TEXTAREA

USAGE

<x-adminlte-textarea>Hi,,,</x-adminlte-textarea>

ALL AVAILABLE ATTRIBUTES

TEXT-EDITOR

REQUIRES
summernote

USAGE

<x-adminlte-text-editor id="myEditor"/>

ALL AVAILABLE ATTRIBUTES

Example Fonts Array

    $fonts = ['Arial', 'Arial Black', 'Comic Sans MS', 'Courier New', 'Impact', 'Montserrat',  'Open Sans'];

SUBMIT

<x-adminlte-submit />

ALL AVAILABLE ATTRIBUTES

Example Codes

You can browse through the examples of advanced usages from examples directory.

Summary

This document might not be well-documented. I will happily accept any documentation pull-requests.

PULL REQUESTS for new components should be in non-master branch

Changelog

Please see CHANGELOG for more information what has changed recently.

License

The MIT License (MIT). Please see License File for more information.