nickdekruijk / admin
An easy to implement, lightweight yet complete Laravel 5.5+ admin panel/backend and media/filemanager.
Installs: 1 383
Dependents: 1
Suggesters: 0
Security: 0
Stars: 5
Watchers: 3
Forks: 2
Open Issues: 0
Requires
- php: ^8.2
- laravel/framework: ^11.0
- dev-master
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- v1.x-dev
- 1.13.9
- 1.13.8
- 1.13.7
- 1.13.6
- 1.13.5
- 1.13.4
- 1.13.3
- 1.13.2
- 1.13.1
- 1.13.0
- 1.12.7
- 1.12.6
- 1.12.5
- 1.12.4
- 1.12.3
- 1.12.2
- 1.12.1
- 1.12
- 1.11.1
- 1.11.0
- 1.10.0
- 1.9.2
- 1.9.1
- 1.9.0
- 1.8.2
- 1.8.1
- 1.8.0
- 1.7.13
- 1.7.12
- 1.7.11
- 1.7.10
- 1.7.9
- 1.7.8
- 1.7.7
- 1.7.6
- 1.7.5
- 1.7.4
- 1.7.3
- 1.7.2
- 1.7.1
- 1.7.0
- 1.6.0
- 1.5.0
- 1.4.3
- 1.4.2
- 1.4.1
- 1.4.0
- 1.3.5
- 1.3.4
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.5
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.0
This package is auto-updated.
Last update: 2024-12-13 13:07:07 UTC
README
Admin
An easy to implement, lightweight yet complete Laravel 5.5+ admin panel/backend and media/filemanager. Basically it's a web-based content editor for your Laravel models. It's very easy to integrate into your existing Laravel application.
nickdekruijk/admin is the next evolution of nickdekruijk/larapages which won't be updated anymore but will remain online for historical reference.
Installation
To install the package use
composer require nickdekruijk/admin
Configuration
After installing for the first time publish the config file with
php artisan vendor:publish --tag=config --provider="NickDeKruijk\Admin\ServiceProvider"
A default config file called admin.php
will be available in your Laravel app/config
folder. See this file for more details. Some important configuration options are highlighted below.
/admin
By default you access admin panel by adding /admin to the URL of your website/application. For example https://www.domain.com/admin
You can change this path by changing the adminpath
configuration option.
Add 'admin_role' to your users
Admin uses the auth middleware from Laravel. To determine if a user has permission you need to add a admin_role
column to your User model and table. You can change the column name with the role_column
configuration option.
A migration is included with the package so you can run php artisan migrate
to add the column. If you don't want to use the included migration you can disable it by changing the configuration option role_column_migration
to false.
Configure modules and roles
The most important configuration option is the modules
array. The default will get you started but you most likely need to change a lot depending on your application. Each module is identified by a unique slug and it has a fontawesome.io icon and opens a view. It also has a title (defaults to the slug) that you can localise (e.g. title_nl). All other options are view/module specific and will be documented in the future. The slugs are also used to define the permissions in the roles
array so if you add or remove modules you probably need to change the roles too.
Login routes
By default Admin will register login and logout routes and use a simple login screen without registration, 'Remember me' or password resets.
If your application already uses authentication your routes/web.php file will probably overwrite these routes but you probably want to disable the Admin routes by changing configuration option auth_routes
to false.
Creating a new user
If your application has no users Admin provides an artisan console command to create or update a user with a random password and assign a role.
php artisan admin:user <email> [<role>]
Role must match one of the roles defined in the configuration. The default role for a new user is "admin".
FAQ
How do I localize the validation messages?
You could use the package arcanedev/laravel-lang, just run composer require arcanedev/laravel-lang
.
License
Admin is open-sourced software licensed under the MIT license.