Build a full-featured administrative interface in ten minutes

Overview

laravel-admin

laravel-admin is administrative interface builder for laravel which can help you build CRUD backends just with few lines of code.

Documentation | 中文文档 | Demo | Demo source code | Extensions

Build Status StyleCI Packagist Total Downloads Awesome Laravel

Inspired by SleepingOwlAdmin and rapyd-laravel.

Sponsor

laravel-admin

Requirements

  • PHP >= 7.0.0
  • Laravel >= 5.5.0
  • Fileinfo PHP Extension

Installation

This package requires PHP 7+ and Laravel 5.5, for old versions please refer to 1.4

First, install laravel 5.5, and make sure that the database connection settings are correct.

composer require encore/laravel-admin

Then run these commands to publish assets and config:

php artisan vendor:publish --provider="Encore\Admin\AdminServiceProvider"

After run command you can find config file in config/admin.php, in this file you can change the install directory,db connection or table names.

At last run following command to finish install.

php artisan admin:install

Open http://localhost/admin/ in browser,use username admin and password admin to login.

Configurations

The file config/admin.php contains an array of configurations, you can find the default configurations in there.

Extensions

Extension Description laravel-admin
helpers Several tools to help you in development ~1.5
media-manager Provides a web interface to manage local files ~1.5
api-tester Help you to test the local laravel APIs ~1.5
scheduling Scheduling task manager for laravel-admin ~1.5
redis-manager Redis manager for laravel-admin ~1.5
backup An admin interface for managing backups ~1.5
log-viewer Log viewer for laravel ~1.5
config Config manager for laravel-admin ~1.5
reporter Provides a developer-friendly web interface to view the exception ~1.5
wangEditor A rich text editor based on wangeditor ~1.6
summernote A rich text editor based on summernote ~1.6
china-distpicker 一个基于distpicker的中国省市区选择器 ~1.6
simplemde A markdown editor based on simplemde ~1.6
phpinfo Integrate the phpinfo page into laravel-admin ~1.6
php-editor
python-editor
js-editor
css-editor
clike-editor
Several programing language editor extensions based on code-mirror ~1.6
star-rating Star Rating extension for laravel-admin ~1.6
json-editor JSON Editor for Laravel-admin ~1.6
grid-lightbox Turn your grid into a lightbox & gallery ~1.6
daterangepicker Integrates daterangepicker into laravel-admin ~1.6
material-ui Material-UI extension for laravel-admin ~1.6
sparkline Integrates jQuery sparkline into laravel-admin ~1.6
chartjs Use Chartjs in laravel-admin ~1.6
echarts Use Echarts in laravel-admin ~1.6
simditor Integrates simditor full-rich editor into laravel-admin ~1.6
cropper A simple jQuery image cropping plugin. ~1.6
composer-viewer A web interface of composer packages in laravel. ~1.6
data-table Advanced table widget for laravel-admin ~1.6
watermark Text watermark for laravel-admin ~1.6
google-authenticator Google authenticator ~1.6

Contributors

This project exists thanks to all the people who contribute. [Contribute].

Backers

Thank you to all our backers! 🙏 [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

Other

laravel-admin based on following plugins or services:

License

laravel-admin is licensed under The MIT License (MIT).

Comments
  • 安装中出现的问题

    安装中出现的问题

    你好,在根据readme的安装步骤中有以下问题:

    安装 问题1:git clone 的master版本找不到config/app.php这个文件 在config/app.php加入ServiceProvider:

    Encore\Admin\Providers\AdminServiceProvider::class 然后运行下面的命令完成安装:

    问题2:在根目录执行php artisan,提示Could not open input file: artisan php artisan vendor:publish --tag=laravel-admin php artisan admin:install

    另外,请问你有及时联系的方式么,比如QQ或者微信,遇到问题也可以及时请教

    opened by kusnet 44
  • 登录系统页面会提示:The page has expired due to inactivity.

    登录系统页面会提示:The page has expired due to inactivity.

    • Laravel Version: 5.6.35
    • PHP Version:7.2.10
    • Laravel-admin: v1.5

    使用其他子账号登录时,有时页面会提示:The page has expired due to inactivity. (419) 本地环境:win7+phpStudy(nginx) 在login.blade.php form加了 @csrf 还是会偶尔出现 @z-song

    opened by Orocker 20
  • Proposal: use Eloquent model instead of stdClass

    Proposal: use Eloquent model instead of stdClass

    Imagine you have a model, like Person, this person has maybe something like hasMany Phone and hasMany Email, now you want to output in a grid 3 phones, 2 e-mails

    Currently it seems impossible, because:

    $grid->column('phone')->display(function($v) {
        dd($this, $v);
    });
    

    Basically, 1) you can't write 'phone,email', 2) $v$ is phone (but not email and 3) $this is stdClass with only phone

    There are two benefits to make $this to Eloquent instead of stdClass:

    1. you can write this:
    $grid->column('info')->display(function() {
        return $this->phone->count() . " phones and " . $this->email->count() . " e-mails";
    });
    
    1. you can write a accessor on Eloquent, like this:
    class Person {
      public function getPhoneInfoAttribute() {
        ..
      }
    }
    
    $grid->column('phone_info');
    

    And due to the fact that Eloquent implements __get, this code (from tests) should still work:

    $grid->column('column2_not_in_table')->display(function () {
        return $this->email.'#'.$this->profile['color'];
    });
    

    as well as this should work

    $grid->column('column2_not_in_table')->display(function () {
        return $this->email.'#'.$this->profile->color;
    });
    

    The main problem is that in Model there is a call $collection->toArray(); which makes all Eloquent models into stdClass, but if you call all() instead - you still get an array, but with Eloquent models.

    opened by slava-vishnyakov 20
  • Composer problem

    Composer problem

    Run composer require encore/laravel-admin "1.3.x-dev" for Laravel 5.3, got this line:

    Failed to download encore/laravel-admin from source: Failed to clone https://github.com/z-song/laravel-admin.git, git was not found, check that it is installed and in your PATH env.

    'git' is not recognized as an internal or external command, operable program or batch file.

    opened by elraghifary 20
  • 重写了model类下边的paginate,结果使用表单的filter功能的时候 ,点击搜索没有走自定义的方法

    重写了model类下边的paginate,结果使用表单的filter功能的时候 ,点击搜索没有走自定义的方法

    • Laravel Version: 5.5.30
    • PHP Version: 7.0.23
    • Laravel-admin: 1.5.19

    Description:

    表单的数据来源用的是自定义的数据,也就是重写了model类下边的paginate方法,可是用filter功能的时候,我看sql没有走自定义的方法,而是走了Eloquent ORM类的方法。这个是个大问题啊,而且我想把搜索条件里的字段处理下,请问我需要调用那个方法?有入口吗? 在线等....

    Steps To Reproduce:

    opened by space-blank 17
  • admin_base_url 函数代码有问题,导致二级目录无法正常使用

    admin_base_url 函数代码有问题,导致二级目录无法正常使用

    • Laravel Version: 5.5
    • PHP Version: 7.2
    • Laravel-admin: 1.7.2

    Description:

        function admin_base_path($path = '')
        {
            $prefix = '/'.trim(config('admin.route.prefix'), '/');
    
            $prefix = ($prefix == '/') ? '' : $prefix;
    
            $path = trim($path, '/');
    
            if (is_null($path) || strlen($path) == 0) {
                return $prefix ?: '/';
            }
    
            return $prefix.'/'.$path;
        }
    

    这个函数写的明显有问题,为什么不直接使用系统的url生成类来生成地址呢?

    Steps To Reproduce:

    1. 将项目部署在二级目录 例如 localhost/project/admin
    2. 所有调用admin_base_path函数的地方生成的路径都是错误的,而系统的url生成类的识别就相对完善不会出现错误
            // Once we have the scheme we will compile the "tail" by collapsing the values
            // into a single string delimited by slashes. This just makes it convenient
            // for passing the array of parameters to this URL as a list of segments.
            $root = $this->formatRoot($this->formatScheme($secure));
    
    

    #3696

    wontfix 
    opened by ycq3 16
  • select 如何设置默认值

    select 如何设置默认值

    • Laravel Version: 5.5
    • PHP Version:7.2
    • Laravel-admin: 1.5.x-dev

    Description:

    $form->select('appauthtoken_id','商户授权码')->options('/admin/ShowAppAuthToken'); 怎么设置默认选中值?

    Steps To Reproduce:

    opened by sdauma 16
  • 多图编辑不显示

    多图编辑不显示

    多图 上传 没问题,但是编辑的时候多图不显示图片 image
    单图没有问题,代码是这样写的 image 多图刚开始做的时候是没有问题的,我是在昨天下午的时候更新了一下composer,然后再看多图 就没有图片了,我看这里有人说是要把vendor/encore/laravel-admin/assets 文件拷贝到 public/packages中,经尝试后,无变化。

    控制器get set 的Attribute 也写了 image 请问,还有什么办法能解决这个问题么?

    opened by gystone 16
  • 右上角批量删除操作不出现

    右上角批量删除操作不出现

    • Laravel Version: 5.5.*
    • PHP Version: 7.13
    • Laravel-admin: 1.7.5

    Description:

    升级到最新版本,右上角批量删除操作不出现

    Steps To Reproduce:

    升级到最新版本,右上角批量删除操作不出现,未调用$grid->disableRowSelector();不知道是什么原因

    opened by YangZhengHuan 15
  • image中设置的默认的rules会导致删除失败

    image中设置的默认的rules会导致删除失败

    screen shot 2017-03-14 at 6 45 52 pm 在点击删除按钮后, screen shot 2017-03-14 at 6 47 50 pm 下列Form中的代码会执行然后返回错误信息->导致报错

            // Handle validation errors.
            if ($validationMessages = $this->validationMessages($data)) {
                return back()->withInput()->withErrors($validationMessages);
            }
    

    顺便提一句,这个注释会导致编辑器提示出现问题:

     /* @var Model $this->model */
    

    screen shot 2017-03-14 at 6 15 50 pm

    opened by never615 15
  • How to replace action buttons globally?

    How to replace action buttons globally?

    I'd like to set a different set of default row actions for all grids. But I can't see a way to do this in bootstrap.php. If this can't be done, I would also like to change the class and icon for the edit|delete actions, but this looks difficult too.

    Right now, I'm doing this on each grid:

    $grid->actions(function ($actions) {
        $actions->disableEdit();
        $actions->append(
            '<a href="'.$actions->getResource().'/'.$actions->getKey().'" class="btn btn-xs btn-info" style="margin-right:4px">
            <i class="fa fa-search" data-toggle="tooltip" data-placement="top" title="" data-original-title="View"></i></a>' );
        $actions->prepend(
             '<a href="'.$actions->getResource().'/'.$actions->getKey().'/edit" class="btn btn-xs btn-primary" style="margin-right:4px">
            <i class="fa fa-pencil" data-toggle="tooltip" data-placement="top" title="" data-original-title="Edit"></i></a>' );
    });
    

    And then the 'delete' button styling doesn't match unless I replace that too.

    opened by jonphipps 15
  • Call to a member function model() on null

    Call to a member function model() on null

    • Laravel Version: 9
    • PHP Version: 8
    • Laravel-admin: Latest

    Description:

    Custom Row & Batch action Call to a member function model() on null vendor\encore\laravel-admin\src\Actions\GridAction.php: 53

    i follow the tutorial and added custome Row action to my grid like this :

    Php artisan admin:action Post\\Replicate --grid-row --name="copy"

    `<?php

    namespace App\Admin\Actions\Post;

    use Encore\Admin\Actions\RowAction; use Illuminate\Database\Eloquent\Model;

    class Replicate extends RowAction { public $name = 'copy';

    public function handle(Model $model)
    {
        // $model ...
    
        return $this->response()->success('Success message.')->refresh();
    }
    

    }`

    $grid->actions(function ($actions) { $actions->add(new Replicate); });

    in my admin.php i use the Actions Class 'grid_action_class' => \Encore\Admin\Grid\Displayers\Actions::class,

    opened by shadirok 0
  • How Can I Hash User password adding a new User at Admin Panel?

    How Can I Hash User password adding a new User at Admin Panel?

    I recently discovered why Users I added at the Admin Panel Cannot login at the front page because the passwords do not match. The reason is that Passwords added at the admin panel are not hashed. So if I use Hash::check to compare passwords, I always receive the error that Password is wrong.

    If you can help with this issue, I will be happy

    • Laravel Version: #.#.#
    • PHP Version:
    • Laravel-admin: #.#.#

    Description:

    Steps To Reproduce:

    opened by Bookerzmedia 1
  • Is Seeder required for releases to other environments?

    Is Seeder required for releases to other environments?

    • Laravel Version: 9.40.1
    • PHP Version: 8.1.13
    • Laravel-admin: 1.8.19

    Description:

    laravel-admin is very useful. Thanks for your great contribution.

    Excuse my rudimentary question. I looked for a similar question but couldn't find it with my help.

    I would like to release menus created locally to other environments. If this is to be accomplished, is it correct that a Seeder needs to be created and run at release time? This time we want to release title as Manager and Feature. The menu content is soft coded in the admin_menu table, is there any way to hard code this for release? (I would like to know if there is a way to prevent Seeder from omitting to create/update/delete them)

    mysql> select * from admin_menu;
    +----+-----------+-------+---------------+--------------+------------------+------------+---------------------+---------------------+
    | id | parent_id | order | title         | icon         | uri              | permission | created_at          | updated_at          |
    +----+-----------+-------+---------------+--------------+------------------+------------+---------------------+---------------------+
    |  1 |         0 |     1 | Dashboard     | fa-bar-chart | /                | NULL       | NULL                | NULL                |
    |  2 |         0 |     2 | Admin         | fa-tasks     |                  | NULL       | NULL                | NULL                |
    |  3 |         2 |     3 | Users         | fa-users     | auth/users       | NULL       | NULL                | NULL                |
    |  4 |         2 |     4 | Roles         | fa-user      | auth/roles       | NULL       | NULL                | NULL                |
    |  5 |         2 |     5 | Permission    | fa-ban       | auth/permissions | NULL       | NULL                | NULL                |
    |  6 |         2 |     6 | Menu          | fa-bars      | auth/menu        | NULL       | NULL                | NULL                |
    |  7 |         2 |     7 | Operation log | fa-history   | auth/logs        | NULL       | NULL                | NULL                |
    |  8 |         0 |     0 | Manager       | fa-bars      | manager          | NULL       | 2022-12-30 10:37:13 | 2022-12-30 10:37:13 |
    |  9 |         8 |     0 | Feature       | fa-bars      | manager/features | NULL       | 2022-12-31 18:59:16 | 2022-12-31 18:59:16 |
    +----+-----------+-------+---------------+--------------+------------------+------------+---------------------+---------------------+
    9 rows in set (0.00 sec)
    

    Steps To Reproduce:

    opened by yuki12321 0
  • 修正preg_match()函数第二个参数需要为字符串

    修正preg_match()函数第二个参数需要为字符串

    高版本的php中对preg_match()的严谨入参,如果第二个参数传null,则会发生以下错误。

    preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php on line 625
    
    opened by asundust 0
  • How to Update the documentation

    How to Update the documentation

    • Laravel Version: 9.19
    • PHP Version: 8.0
    • Laravel-admin: 1.8

    Description:

    Just wondering how to update the English documentation. There are several details missing that are essential for error free usage of this amazing tool

    Steps To Reproduce:

    opened by abid1208 0
Releases(v1.8.19)
Owner
Song
Creator of laravel-admin and implode.io
Song
Laravel CRUD Generator, Make a Web Application Just In Minutes, Even With Less Code and fewer Steps !

?? CRUDBOOSTER - Laravel CRUD Generator Laravel CRUD Generator, Make a Web Application Just In Minutes, Even With Less Code and fewer Steps ! About CR

Crocodic Studio 1.7k Jan 8, 2023
Generate Admin Panels CRUDs and APIs in Minutes with tons of other features and customizations with 3 different themes

InfyOm Laravel Generator Generate Admin Panels CRUDs and APIs in Minutes with tons of other features and customizations with 3 different themes. Docum

InfyOmLabs (InfyOm Technologies) 3.5k Jan 1, 2023
Quickly build an admin interface for your Eloquent models

Website | Documentation | Add-ons | Pricing | Services | Stack Overflow | Reddit | Blog | Newsletter Quickly build an admin interface for your Eloquen

Backpack for Laravel 2.5k Jan 6, 2023
A lightweight full-stack component layer that doesn't dictate your front-end framework

Airwire A lightweight full-stack component layer that doesn't dictate your front-end framework Demo Introduction Airwire is a thin layer between your

ARCHTECH 199 Nov 23, 2022
This is a laravel Auth Starter Kit, with full user/admin authentication with both session and token auth

About Auth Starter It's a Laravel 8 authentication markdown that will help you to understand and grasp all the underlying functionality for Session an

Sami Alateya 10 Aug 3, 2022
Fluent Interface for Laravel Backpack - Define resources once and get all CRUD configurations ready!

CRUD Resource for Laravel Backpack This package allows creating CRUD panels for Backpack for Laravel administration panel using fluent field definitio

FigLab 8 Nov 20, 2022
Build and deploy Non-Fungible Algorand Tokens with Laravel & IPFS

Introduction Laravel is a web application framework with an expressive, elegant syntax designed to make developing web apps easier and faster through

Tomas Verhelst 26 Dec 12, 2022
Wave - The Software as a Service Starter Kit, designed to help you build the SAAS of your dreams 🚀 💰

Introduction Wave is a Software as a Service Starter Kit that can help you build your next great idea ?? . Wave is built with Laravel, Voyager, Tailwi

null 4.2k Jan 4, 2023
Simple web app with laravel build from scratch

Find Me Simple Web Application This "Find Me" matchmaking web-based application is useful for facilitating people who are looking for new relationship

Jieyab 15 Nov 26, 2022
🐳 Build a simple laravel development environment with docker-compose.

docker-laravel ?? Introduction Build a simple laravel development environment with docker-compose. Usage $ git clone [email protected]:ucan-lab/docker-la

ucan-lab 911 Jan 5, 2023
A skeleton for build your Kata with Docker

A skeleton for build your Kata with Docker

Raúl Coloma Bonifacio 1 Nov 12, 2021
🧿 Build navigation or menu for Laravel and Awes.io. Unlimited complexity and depth, with permissions and sorting support.

Navigator Laravel package that can easily create navigation menus of any complexity. With support for routing, permissions, sorting, rendering depth,

Awes.io 47 Jul 18, 2022
This application was build with the purpose of learning PHP.

Chat-App ?? About this file The purpose of this file is to provide overview, setup instructions and background information of the project. ▶️ Demo Her

Luis Monzon 5 Dec 14, 2021
A PHP notebook application build with PHP Symfony as back-end API and VueJS/Vuetify front-end.

PHPersonal Notes ?? - BETA RELEASE PHPersonal notes is an application to store your personal notes! PHPersonalnotes is build with Symfony/VueJS/Vuetif

Robert van Lienden 3 Feb 22, 2022
A Event Management system - EMS build with Laravel and Vuejs

Event Management system - EMS A Event Management system - EMS build with Laravel and Vuejs Both FE & BE project folders has own README.md files for in

hassan 5 Jul 21, 2022
A starter template from which to build Laravel + Vite apps

Stack The Laravel framework is fast, clean, and filled with best practices. In this stack, it will handle the backend as an API. The Laravel Vite pack

null 7 Nov 14, 2022
dcat-admin's extension that was build in one package by vue

Dcat Admin Extension 此扩展为大合一扩展,以后使用vue3构建的组件都将合并在一起 演示地址 demo: http://dcat.weiwait.cn (admin:admin) 依赖扩展 freyo/flysystem-qcloud-cos-v5 overtrue/larave

null 7 Dec 3, 2022
Api first backend boilerplate build with laravel 🎯 you can use as a template 😉

Laravel Backend Template i use this as a starting point for my backend projects , it saves time with basic auth functionalities and has code examples

Hijen EL Khalifi 4 Nov 14, 2022
YCOM Impersonate. Login as selected YCOM user 🧙‍♂️in frontend.

YCOM Impersonate Login as selected YCOM user in frontend. Features: Backend users with admin rights or YCOM[] rights, can be automatically logged in v

Friends Of REDAXO 17 Sep 12, 2022
🦉 Administrative interface builder for Laravel (Laravel admin)

Laravel Admin Panel SleepingOwl SleepingOwl Admin is an administrative interface builder for Laravel. Completely free Support Laravel > 5.5 - 5.8 (PHP

Laravel Framework Russian Community 746 Jan 4, 2023