All Projects → hexters → Ladmin

hexters / Ladmin

Licence: mit
Make an Administrator page in 5 minutes

Projects that are alternatives of or similar to Ladmin

Doctype admin
Laravel Admin Panel for lazy developers. Contains User Management, Roles and Permission Management, Activity Logging and integratable packages
Stars: ✭ 44 (-75.96%)
Mutual labels:  laravel-admin
Laravel Admin
Build a full-featured administrative interface in ten minutes
Stars: ✭ 10,271 (+5512.57%)
Mutual labels:  laravel-admin
Ladmin
EasyLms is a development management system with Laravel
Stars: ✭ 141 (-22.95%)
Mutual labels:  laravel-admin
Larrock Core
Core components for LarrockCMS
Stars: ✭ 46 (-74.86%)
Mutual labels:  laravel-admin
Yicms
基于laravel5.5 开发的Yicms系统的基础架构
Stars: ✭ 93 (-49.18%)
Mutual labels:  laravel-admin
Crudbooster
Laravel CRUD Generator, Make an Advanced Web Application Quickly
Stars: ✭ 1,580 (+763.39%)
Mutual labels:  laravel-admin
Stationery Cms
💡基于laravel-admin1.6.0开发的办公用品管理系统,含excel导出、查询快递功能
Stars: ✭ 37 (-79.78%)
Mutual labels:  laravel-admin
Awesome Laravel Admin
A curated list of Laravel-admin resources
Stars: ✭ 176 (-3.83%)
Mutual labels:  laravel-admin
Larafly
Rapid Laravel UI Starter
Stars: ✭ 103 (-43.72%)
Mutual labels:  laravel-admin
Aimeos
Integrated online shop based on Laravel 8 and the Aimeos e-commerce framework
Stars: ✭ 2,354 (+1186.34%)
Mutual labels:  laravel-admin
Config
Config manager for laravel-admin
Stars: ✭ 83 (-54.64%)
Mutual labels:  laravel-admin
Project
⭐️ Antares Project Application Skeleton. This is the very first place you should start. It allows you to create a brand new awesome project in easy few steps.
Stars: ✭ 84 (-54.1%)
Mutual labels:  laravel-admin
Laravel Api Boilerplate
A Boilerplate Project For Laravel API's (NOT MAINTAINED)
Stars: ✭ 113 (-38.25%)
Mutual labels:  laravel-admin
Laravel Settings
Simple Settings package for a laravel application
Stars: ✭ 45 (-75.41%)
Mutual labels:  laravel-admin
Speedy
🚄A Laravel Admin Package to create a website quickly
Stars: ✭ 146 (-20.22%)
Mutual labels:  laravel-admin
Api Tester
API tester for laravel-admin
Stars: ✭ 38 (-79.23%)
Mutual labels:  laravel-admin
Log Viewer
Log viewer for laravel
Stars: ✭ 108 (-40.98%)
Mutual labels:  laravel-admin
Platform
A @laravel based RAD platform for back-office applications, admin/user panels, and dashboards.
Stars: ✭ 2,623 (+1333.33%)
Mutual labels:  laravel-admin
Adminlte Laravel
A Laravel 5 package that switchs default Laravel scaffolding/boilerplate to AdminLTE template and Pratt Landing Page with Bootstrap 3.0
Stars: ✭ 1,814 (+891.26%)
Mutual labels:  laravel-admin
Voyager
Voyager - The Missing Laravel Admin
Stars: ✭ 10,801 (+5802.19%)
Mutual labels:  laravel-admin

Ladmin (Laravel Admin)

Latest Stable Version Total Downloads License

Make an Administrator page in 5 minutes

Example Image

Index

Laravel Version

Version Laravel
v1.0.x 7.x
Last version 8.x

Note

Before using this package you must already have a login page or route login route('login') for your members, you can use laravel/breeze, larave/ui or laravel jetstream.

For member pages, you should use a different guard from admin or vice versa.

Scheme

Installation

You can install this package via composer:

$ composer require hexters/ladmin

Add this trait to your user model

. . .
use Hexters\Ladmin\LadminTrait;

class User extends Authenticatable {

  use Notifiable, LadminTrait;

  . . .

Publish asset and system package

$ php artisan vendor:publish --tag=assets --force
$ php artisan vendor:publish --tag=core

Attach role to user admin with database seed or other

. . .

  $role = \App\Models\Role::first();
  \App\Models\User::factory(10)->create()
    ->each(function($user) use ($role) {
      $user->roles()->sync([$role->id]);
    });

. . .

Ladmin need the database notification. see the documentation Database Notifications

$ php artisan notifications:table

Migrate database

$ php artisan migrate --seed

Add Ladmin route to your route project routes/web.php

. . .

use Illuminate\Support\Facades\Route;
use Hexters\Ladmin\Routes\Ladmin;

. . .

Ladmin::route(function() {

    Route::resource('/withdrawal', WithdrawalController::class); // Example

});

. . .

Installation finish, you can Access admin page in this link below.

http://localhost:8000/administrator

Manage Sidebar & Top Menu

To add a menu open app/Menus/sidebar.php file and top_right.php

Create Datatables server

Create datatables server to handle your list of data

$ php artisan make:datatables UserDataTables  --model=User

Example below

. . .

use App\DataTables\UserDataTables;

class UserController extends Controller {

  . . .

  public function index() { 

    . . .

    return UserDataTables::view();

    // OR custom view and custom data

    return UserDataTables::view('your.custom.view', [ 
      /**
       * You can catch this data form blade or UserDatatables class 
       * via static property `self$data`
       */
      'foo' => 'bar'
    ]);

  }

. . .

Role & Permission

Protect your module via Controller

. . . 
class UserController extends Controller {

  . . .

  public function index() {

    ladmin()->allow(['administrator.account.admin.index']) // Call the gates based on menu `app/Menus/sidebar.php`

    . . .

    

For an other you can use @can() from blade or auth()->user()->can() more Gates

Example Image

User Activity

Add this trait Hexters\Ladmin\LadminLogable to all the models you want to monitor. Inspired by haruncpi/laravel-user-activity

. . .

use Hexters\Ladmin\LadminLogable;

class Role extends Model {
    
    use HasFactory, LadminLogable;

. . .

Example Image

System Log

Example Image

Blade Layout

Ladmin layout

  <x-ladmin-layout>
    <x-slot name="title">Title Page</x-slot>
    <x-slot name="buttons">
      {-- Top Buttons --}      
    </x-slot>

    {-- Your content here --}    

  </x-ladmin-layout>
  

Example Image

Datatables Render

If you have a custom view for render data from Datatables server you should call this component to render your table

<x-ladmin-datatables :fields="$fields" :options="$options" />

Attributes

Attribute value require
fields don't be changed the value should be still $fields YES
options don't be changed the value should be still $options YES

Icons

You can user Fontawesome or SVG file in resources/assets/icons, svg file retrieved from site Heroicons

  ladmin()->icon('fas fa-user')

  // OR

  ladmin()->icon('user')

  // OR 

  ladmin()->icon('somefolder.customicon') // resources/assets/icons/somefolder/customicon.svg

Custom Style

Install node modules

$ npm i jquery popper.js bootstrap @fortawesome/fontawesome-free [email protected] [email protected] vue --save

// OR

$ yarn add jquery popper.js bootstrap @fortawesome/fontawesome-free [email protected] [email protected] vue

Add this code to your webpack.mix.js file

mix.js('resources/js/ladmin/app.js', 'public/js/ladmin/app.js')
   .sass('resources/sass/ladmin/app.scss', 'public/css/ladmin/app.css');

Custom Avatar

By default admin uses gravatar. If you want to change it, add the avatar_url field to yourusers table and it must be a URL value.

Call avatar url below

  $user->gravatar_url
  // out: gravatar url / your custom url

Notification

By default notification has activated, you can disable notification with set value to false

. . .

'notification' => false

. . .

Send notification

ladmin()
  ->notification()
    ->setTitle('new Invoice')
    ->setLink('http://project.test/invoice/31eb6d58-3622-42a4-9206-d36e7a8d6c06')
    ->setDescription('Pay invoice #123455')
    ->setImageLink('http://porject.test/icon-invoice.ong') // optional
    ->setGates(['administrator.accounting', 'administrator.owner']) // optional
  ->send()

Notification required |Option|Type|required|Note| |-|-|:-:|-| |setTitle|String|YES|-| |setLink|String|YES|-| |setImageLink|String|NO|-| |setDescription|String|YES|-| |setGates|Array|NO| default all gates |

Listening For Notifications

Notifications will broadcast on a private channel formatted using a {notifiable}.{id} convention. View complete Documentation

  // Change App.Models.User bas on config('ladmin.user')

  Echo.private('App.Models.User.' + userId)
    .notification((notification) => {
        console.log(notification.type);
    });

Example Image

Options

You can store the option for your application with the ladmin option,

Create or Update option

Data type of value is String, Number and Array

  ladmin()->update_option('my-option', ['foo', 'bar', 'baz']);
  // out: boolean

Get Option Value

  ladmin()->get_option('my-option');
  // out: Array ['foo', 'bar', 'baz']

Delete Option

ladmin()->delete_option('my-option');
// out: boolean
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].