Download the PHP package dainsys/locky without Composer
On this page you can find all versions of the php package dainsys/locky. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download dainsys/locky
More information about dainsys/locky
Files in dainsys/locky
Download dainsys/locky
More information about dainsys/locky
Files in dainsys/locky
Vendor dainsys
Package locky
Short Description A laravel UI wrapper for spatie/laravel-permission with Bootstrap 4!
License MIT
Package locky
Short Description A laravel UI wrapper for spatie/laravel-permission with Bootstrap 4!
License MIT
Please rate this library. Is it a good library?
Informations about the package locky
Dainsys Locky
A laravel UI wrapper for spatie/laravel-permission with Bootstrap 4!
Installation
- Install with
composer
by runining the commandcomposer require dainsys/locky
-
Add the
Dainsys\Locky\WithLockyAcl;
to yourUser
model(s); -
Add the following item to the
protected $casts
array: - Set you
[email protected]
in the .env file. - This package relies on you having an auth system. We strongly suggest using
laravel/jetstream
,laravel/freeze
or the legacylaravel/ui
- Views:
- The package ships with it's own views, therefore you MUST publish the package public assets by running
php artisan vendor:publish --tag=locky-public
. However, this is not necessary if you are planning to use your views. In this case you can runphp artisan vendor:publish --tag=locky-views
and make them extends your own layout view. - Migrations:
- By default the packages migrations will run if you execute the
php artisan migrate
command. However, you can set thewith_migrations
option to false and handle the migrations yourselve. To do this, first run thephp artisan vendor:publish --tag=locky-config
command. - Add the following liks to the auth portion of your
layouts.app
links: ` - You could also publish the package migrations by running
php artisan vendor:publish --tag=locky-migrations
and tweak them to suit your needs.Usage
-
After installing this package, you can limit user access by creating Laravel Policies with
php artisan make:policy
command and add the checksreturn $user->hasAnyRole(["role1", "role2"])
orreturn $user->hasAnyPermission(["permission1", "permission2"])
and by updating the Controller's constructor method: - Please read Larave Authorization's documentations at https://laravel.com/docs/7.x/authorization
- This package add the concept of actives or inactive users by adding query scopes. Just use the scope
actives()
orinactives()
to filter as desired. - You can activate an user by calling the
activate()
method on a Eloquent User record; useinactivate()
to inactivate an user.Dependencies
- Dainsys Components: https://packagist.org/packages/dainsys/components
- Laravel Ui: https://laravel.com/docs/7.x/authorization
- Spatie Permission: https://docs.spatie.be/laravel-permission/v3/introduction/
All versions of locky with dependencies
PHP Build Version
Package Version
Requires
php Version
^7.2
dainsys/components Version ^1.0
spatie/laravel-permission Version ^3.0
laravel/framework Version ^6.0|^7.0|^8.0
livewire/livewire Version ^2.4
dainsys/components Version ^1.0
spatie/laravel-permission Version ^3.0
laravel/framework Version ^6.0|^7.0|^8.0
livewire/livewire Version ^2.4
The package dainsys/locky contains the following files
Loading the files please wait ....