Download the PHP package acoustep/entrust-gui without Composer
On this page you can find all versions of the php package acoustep/entrust-gui. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download acoustep/entrust-gui
More information about acoustep/entrust-gui
Files in acoustep/entrust-gui
Package entrust-gui
Short Description A GUI for the Entrust package.
License MIT
Homepage https://github.com/acoustep/entrust-gui
Informations about the package entrust-gui
Entrust GUI
Entrust GUI is a Admin Interface that makes the administration of users, roles and permissions easier for the Entrust package.
This package is currently not for handling authentication, authorisation or registration of users.
Installation
For Laravel 5.2 - 5.7 see the 5.2 branch for installation details.
For Laravel 5.8+ see the 5.8 branch for installation details.
Add the package to your file
Add the service provider to your file
Add the Entrust Alias to your file as well.
Publish the configuration file(s)
If you haven't already set up Entrust then make the migration file and run the migration.
Entrust GUI uses esensi/model which means you can set your validation rules in your models.
To generate , and models run the command.
See the manually creating models section if you prefer to adjust your current model files.
By default, all three files are published into the directory. You can specify the files separately and the location
Add the Entrust GUI middleware to . This middleware will allow users with the role (case sensitive) to access Entrust GUI and deny other users.
At this point you're all good to go. See Getting Started for how to use the package.
Getting Started
Accessing Entrust GUI
By default all routes are prefixed with .
- Users:
- Roles:
- Permissions:
You can change this prefix by editing in .
Pointing your app to will redirect you to if you are not logged in as admin using the default middleware.
If you have not set up Laravel authentication you will see a exception. See the Laravel Authentication documentation for setting up the Login system in Laravel 5.1.
Middleware
By default Entrust GUI uses for middleware. This allows logged in users with the role to access it.
You can change the middleware in in the setting.
If you wish to test out the system without middleware then go to and set middleware to .
If you want to change the name of the role that has access to the middleware, update in the configuration file.
Layout
To use your own layout override the key in with the template you wish to use.
Each template yields to and so make sure your new layout has those sections.
Editing Templates
To edit the template files you first need to publish them
All files are then stored in the directory.
Routes
You may wish to link to pages in your own templates. EntrustGUI follows Laravel's method with the exception of .
Events
The following event classes are available:
- , , .
- , , .
- , , .
Example Event Listener
Add the listeners you need to use to .
Editing Translations
Run the publish translation command
Translations are then published to .
Adding Password Confirmation Field to Users
Update your model to the following:
Update
Generating Models Command Options
Generating a specific model
Changing the model directory destination
Skipping confirmation prompts for overwriting existing files
Manually Creating Models
Here are , and models. Make sure these parameters are and traits are included for the package to work as intended.
app/User.php
app/Role.php
app/Permission.php
Upgrade Guide / Breaking Changes
0.6
Includes a new config key, "unauthorized-url" which lets you set the redirection if a user is not authorized. If this key is not found, it will use the old url, /auth/login. The default is set to /auth/login to match Laravel 5.1's documentation on the authentication routes.
0.3.* to 0.4.0
Starting from 0.4.0 Entrust GUI switches from to .
Hashing passwords has moved from the package to the model.
Update your model to the one in the latest documentation.
Add to your configuration file.
If you intend to use the confirmable option and have already published the views add the following to your template
Support Entrust GUI
Entrust GUI is maintained entirely in my own time. If you'd like to help, please feel free to open an issue with feature requests or proposals. If you'd like to buy me a coffee to say thanks, check out my ko-fi page.
To do
- Advanced middleware configuration
- More testing
- More documentation
All versions of entrust-gui with dependencies
illuminate/console Version ~5.0
illuminate/support Version ~5.0
zizaco/entrust Version ~1.4.0
prettus/l5-repository Version ^2.1
esensi/model Version 0.5.*