systeminc / laravel-admin by systeminc

Administration panel for Laravel framework
565
73
2
Package Data
Maintainer Username: systeminc
Maintainer Contact: mladen@system-inc.com (Mladen Janjetovic)
Package Create Date: 2016-08-08
Package Last Update: 2023-01-03
Language: PHP
License: MIT
Last Refreshed: 2024-11-19 03:13:08
Package Statistics
Total Downloads: 565
Monthly Downloads: 2
Daily Downloads: 0
Total Stars: 73
Total Watchers: 2
Total Forks: 10
Total Open Issues: 30

Laravel Administration Panel

Build Status StyleCI

This is Laravel Admin, CRUD (create, read, update and delete) package that can help you get your administration panel in minutes. At this moment we support these modules:

  • Pages (page elements, subpages, images, html editor)
  • Galleries (images, change order)
  • Blog (posts, comments)
  • Shop (products, categories, comments, orders, stock)
  • Places (locations, maps)
  • Leads (contacts, subscriptions)
  • Multiple admins

Once you have your administration panel up, you can easily put all of those elements wherever you want in you application files. For usage documentation see Usage section bellow.

Supports Laravel 5.2 -> 5.6 and PHP 7+

. . . . . .


Installation

Install using composer:

$ composer require systeminc/laravel-admin

In Laravel 5.5, with Package Auto Discovery it should all be set automatically. For < 5.5, follow these instructions after composer finishes package installation:

Add the service provider to the 'providers' array in config/app.php for Laravel 5.4 and lower:

SystemInc\LaravelAdmin\AdminServiceProvider::class,

If you want to use this package as a facade, add this line to the $aliases array in config/app.php.

'SLA' => SystemInc\LaravelAdmin\Facades\SLA::class,

Start package installation by running install command below:

$ php artisan laravel-admin:install

If you want to install package again from scratch, just delete the config/laravel-admin.php file and drop database, then run install command again.

If our package update throws composer error, try updating dependencies manually with commend below:

$ php artisan laravel-admin:update

Note that this installation uses migrations, so you must run it from machine that has access to your database.

For instance, if you use Vagrant, you will have to do vagrant ssh first, go to your project directory, and run this install command. The same way you run your standard Laravel's migration command.

Extends

  • To extend order item view in admin panel, in order to customize and show more details about your order item that are custom to your bisnis model, add blade template resources\view\sla\order\item.blade.php in you project. order item data is available within $orderItem variable.
  • To extend admin package navigations view add blade in you project resources\view\sla\layout\navigation.blade.php. Use unordered list <ul>.
  • To extend admin router with your own controllers create new file in /routes/sla-routes.php and point it to you controller. This will be under choosen prefix and secured with Admin's credentials. To keep view in same layout visit this example

Database export

If you use this Laravel Admin package within a team, you will find this artisan command that backups and restores database very useful.

Backup database with command:

$ php artisan laravel-admin:dump-database

Your will be prompted to Enter password: for mysql user specified in .env. File will be saved in /database/sla_dumps.

To restore database on another machine use:

$ php artisan laravel-admin:restore-database

NOTICE* Always do migration first and be carefull that new import is compatable with tour migration status. You can check that with Artisan command php artisan migrate:status before dumoing the export file, and before importing the same on another machine.

WARNING that this will be DROP table and restore latest migration in database/sla_dumps folder. Your will be prompted to proceed twice with droping database. Mysql will ask several times to Enter password: for mysql user specified in .env. We are not responsible for any data loss. Use this with caution.

Bash alias

You can create Laravel Admin alias, i.e. in your Homestead environment by adding this function to your bash profile (vi ~/.bash_aliases):

function sla() {
    php artisan laravel-admin:"$1"
}

Then if you want to do php artisan laravel-admin:update, just type:

$ sla update

Documentation

Visit Wiki for detailed usage documentation.

Contributing

Contributions to the Laravel Admin library are welcome. Please note the following guidelines before submiting your pull request.

  • Follow PSR-2 coding standards.
  • Write tests for new functions and added features
  • use Laravel Mix for assets

composer install

$ composer install

npm install

$ npm --prefix ./src install

bower install

$ cd src/resources/assets/src
$ bower install

build

$ cd src
$ npm run production

License

This Laravel Admin is open-source software licensed under the MIT license