All Projects → LLoadout → laravel-inforce

LLoadout / laravel-inforce

Licence: MIT License
A toolset to kickstart your application on top of Laravel Livewire, Laravel Jetstream and Spatie Permissions. LLoadout inforce is created using the TALL stack.

Programming Languages

Blade
752 projects
PHP
23972 projects - #3 most used programming language
hack
652 projects

Projects that are alternatives of or similar to laravel-inforce

Brandenburg
Laravel Authentication Package
Stars: ✭ 79 (+558.33%)
Mutual labels:  permissions, users, roles
ngx-access
Add access control to your components using hierarchical configuration with logical expressions.
Stars: ✭ 21 (+75%)
Mutual labels:  permissions, roles
rbac
Simple RBAC/ACL for Laravel 8 caching and permission groups.
Stars: ✭ 43 (+258.33%)
Mutual labels:  permissions, roles
laravel-acl
Laravel ACL is a simple role, permission ACL for Laravel Framework.
Stars: ✭ 78 (+550%)
Mutual labels:  permissions, roles
Adonis Acl
demo app: https://github.com/enniel/adonis-acl-blog-demo
Stars: ✭ 195 (+1525%)
Mutual labels:  permissions, roles
Vue Router User Roles
A Vue.js plugin that protects routes based on user roles. Add your own authentication.
Stars: ✭ 237 (+1875%)
Mutual labels:  permissions, roles
permissionary
Tiny and framework-agnostic role-based permission management using composition over inheritance
Stars: ✭ 19 (+58.33%)
Mutual labels:  permissions, roles
Laratrust
Handle roles and permissions in your Laravel application
Stars: ✭ 1,799 (+14891.67%)
Mutual labels:  permissions, roles
React-Express-JWT-UserPortal
React.js & Express.js User portal Using Core UI, JWT, JWT Token, Refresh Token, Role & Permission management, User manamgenet, Event Log.
Stars: ✭ 22 (+83.33%)
Mutual labels:  permissions, roles
django-hats
Role-based permissions system for Django. Everyone wears a different hat, some people wear multiple.
Stars: ✭ 21 (+75%)
Mutual labels:  permissions, roles
spree admin roles and access
Admin Roles And Access for Spree
Stars: ✭ 45 (+275%)
Mutual labels:  permissions, roles
Vue Gates
🔒 A Vue.js & Nuxt.js plugin that allows you to use roles and permissions in your components or DOM elements, also compatible as middleware and methods.
Stars: ✭ 184 (+1433.33%)
Mutual labels:  permissions, roles
Think Authz
An authorization library that supports access control models like ACL, RBAC, ABAC in ThinkPHP 6.0 .
Stars: ✭ 155 (+1191.67%)
Mutual labels:  permissions, roles
Bouncer
Eloquent roles and abilities.
Stars: ✭ 2,763 (+22925%)
Mutual labels:  permissions, roles
Maravel Permissions
Because in the Maravelous univer every user deserves super power
Stars: ✭ 139 (+1058.33%)
Mutual labels:  permissions, roles
nova-permissions
Add Permissions based authorization for your Nova installation via User-based Roles and Permissions. Roles are defined in the database whereas Permissions are defined in the code base.
Stars: ✭ 115 (+858.33%)
Mutual labels:  permissions, roles
HeimGuard
🛡 A simple library that allows you to easily manage permissions in your .NET projects.
Stars: ✭ 77 (+541.67%)
Mutual labels:  permissions, roles
Laravel Auth
A powerful authentication, authorization and verification package built on top of Laravel. It provides developers with Role Based Access Control, Two-Factor Authentication, Social Authentication, and much more, compatible Laravel’s standard API and fully featured out of the box.
Stars: ✭ 128 (+966.67%)
Mutual labels:  permissions, roles
Laravel Governor
Manage authorization with granular role-based permissions in your Laravel Apps.
Stars: ✭ 131 (+991.67%)
Mutual labels:  permissions, roles
view-admin-as
View the WordPress admin as a different role, switch between users, temporarily change your capabilities, set default screen settings for roles, manage your roles and capabilities.
Stars: ✭ 44 (+266.67%)
Mutual labels:  users, roles

Tests Downloads

LLoadout

LLoadout is your loadout for Laravel. It helps you with tips , code examples and packages to make you a better Laravel developer.

LLoadout inforce

With LLoadout Inforce you will kickstart your Laravel development when using Laravel Jetstream and Spatie permissions.

Users, roles and permissions

LLoadout inforce will add a ui for managing users, roles, permission and menus. It will also provide you with an ui to link users to roles and assign permissions to roles.

manage roles

you can manage roles and assign permissions to the roles

manage users

you can manage users and assign them a role. You can also assign permissions on user level.

manage menus

you can manage menus

Installation

Installing Laravel Jetstream, the Livewire version

Laravel Jetstream is a requirement for this package, if you haven't allready install it i refer to the docs of Jetstream to install it.

https://jetstream.laravel.com/2.x/installation.html#livewire

Installing Laravel Permissions

If you hadn't already installed Laravel Permissions , install it first, therefor I refer to the docs of Spatie

https://spatie.be/docs/laravel-permission/v5/installation-laravel

Attention : don't forget to read the prerequisites : https://spatie.be/docs/laravel-permission/v5/prerequisites

Installation of LLoadout inforce

composer require lloadout/inforce

Assets

LLoadout inforce uses some default menus and permissions, these can be created via the provided migrations and seeder.

php artisan vendor:publish --tag=LLoadoutInforce-migrations
php artisan vendor:publish --tag=LLoadoutInforce-seeders
php artisan migrate
php artisan db:seed --class=InforceSeeder

Publish optional assets

php artisan vendor:publish --tag=LLoadoutInforce-views
php artisan vendor:publish --tag=LLoadoutInforce-langs

Navigation

It provides a ui for navigation management and navigation permissions.

Therefore you have to add this tag after the Navigation Links section navigation-menu.blade.php. Default on line 19

 <livewire:navigation/>

 or

@if(Auth::user()->hasRole('superuser')) // or your optional roles
    <livewire:user-management-menus/>
    <livewire:developer-menus/>
@endif

And add mobile menu default on line 214

@if(Auth::user()->hasRole('superuser'))  // or your optional roles
    <livewire:user-management-menus-mobile/>
    <livewire:developer-menus-mobile/>
@endif

Logging in

LLoadout inforce will default create a user with username of [email protected] and the password password

Extending the package

Assume you want to add fields to the user view and want to save the field to the database. Than you can use the published view and extend the LLoadout user component. Herefore you have to create your own route to your own created component.

This is the route

Route::get('/user/detail/{user?}', \App\Http\Livewire\MyUser::class)->whereNumber('id')->name('users.edit');

This can be your component

<?php

namespace App\Http\Livewire;

use LLoadoutInforce\Http\Livewire\Traits\HandlesPermissions;
use LLoadoutInforce\Http\Livewire\Traits\ShowPerks;

class MyUser extends \LLoadoutInforce\Http\Livewire\User
{


    protected function rules()
    {

        return [
            'user.name'                  => 'required|string',
            'user.email'                 => ['required', 'email', 'not_in:' . $this->user->id],
            'user.password'              => 'required|confirmed',
            'user.password_confirmation' => 'required',
            'user.extrafield'            => 'required'
        ];
    }

}

Documentation

Via the permissions menu you can create your permissions, they are stored in the database. Via the user or role menu it is possible to assign a permission to a role or a user.

It is also possible to create menu's and corresponding permissions for the menu's. Giving users or roles access to the menu's via the roles and users management.

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].