All Projects → SecTheater → laravel-jarvis

SecTheater / laravel-jarvis

Licence: MIT license
Achieve Your Ambition With Me .

Programming Languages

PHP
23972 projects - #3 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to laravel-jarvis

Laravel Settings
Simple Settings package for a laravel application
Stars: ✭ 45 (+40.63%)
Mutual labels:  laravel-admin, laravel-5-package
Administrator
a fork from Frozennode/Administrator
Stars: ✭ 296 (+825%)
Mutual labels:  laravel-admin, laravel-5-package
coasterframework
Main code repository for Coaster CMS (coastercms.org), a full featured Laravel based, Content Management System
Stars: ✭ 30 (-6.25%)
Mutual labels:  laravel-5-package, laravel-cms
Bouncer
Eloquent roles and abilities.
Stars: ✭ 2,763 (+8534.38%)
Mutual labels:  authorization, laravel-5-package
Cms
Multilingual PHP CMS built with Laravel and bootstrap
Stars: ✭ 2,342 (+7218.75%)
Mutual labels:  laravel-admin, laravel-cms
Larrock Core
Core components for LarrockCMS
Stars: ✭ 46 (+43.75%)
Mutual labels:  laravel-admin, laravel-5-package
lara-s-cms
A PHP Laravel Skeleton for CMS/Admin Dashboard (within/without website)
Stars: ✭ 28 (-12.5%)
Mutual labels:  laravel-admin, laravel-cms
Adminlte Laravel
A Laravel 5 package that switchs default Laravel scaffolding/boilerplate to AdminLTE template and Pratt Landing Page with Bootstrap 3.0
Stars: ✭ 1,814 (+5568.75%)
Mutual labels:  laravel-admin, laravel-5-package
Brandenburg
Laravel Authentication Package
Stars: ✭ 79 (+146.88%)
Mutual labels:  authorization, laravel-5-package
content-management-system
Content management system for laravel developers'. It's easy to install and run.
Stars: ✭ 16 (-50%)
Mutual labels:  laravel-5-package, laravel-cms
ertis-auth
Generic token generator and validator service like auth
Stars: ✭ 28 (-12.5%)
Mutual labels:  authorization
rabbitmq-auth-backend-cache
Authorisation result caching plugin (backend) for RabbitMQ
Stars: ✭ 17 (-46.87%)
Mutual labels:  authorization
webnative
Fission's browser SDK
Stars: ✭ 80 (+150%)
Mutual labels:  authorization
pairing-shiro-javaee7
Source code for the "Pairing Apache Shiro and Java EE 7" book
Stars: ✭ 21 (-34.37%)
Mutual labels:  authorization
rabbitmq-auth-backend-oauth2-spike
See rabbitmq/rabbitmq-auth-backend-oauth2 instead.
Stars: ✭ 17 (-46.87%)
Mutual labels:  authorization
opa-java-spring-client
Simple Spring client for working with the Open Policy Agent
Stars: ✭ 19 (-40.62%)
Mutual labels:  authorization
maker
Laravel 5.4 maker
Stars: ✭ 18 (-43.75%)
Mutual labels:  laravel-5-package
laravel5-api
A modular controller for exposing Laravel 5 Eloquent models as a REST API
Stars: ✭ 13 (-59.37%)
Mutual labels:  laravel-5-package
HeimGuard
🛡 A simple library that allows you to easily manage permissions in your .NET projects.
Stars: ✭ 77 (+140.63%)
Mutual labels:  authorization
laravel-materialize-css
Materialize CSS Framework for Laravel 5
Stars: ✭ 45 (+40.63%)
Mutual labels:  laravel-5-package

StyleCI

SensioLabsInsight

Latest Version on Packagist

Made with ❤️ by SecTheater Foundation: http://www.sectheater.org

Package Documentation : http://www.sectheater.org/documentation

the Jarvis CheatSheet will be availble soon


Jarvis provides you the following :

1. Authentication System

Login, Register, Reminders,Security Questions for reseting passwords and Activations.

2. Comment System & Reply System

3. Like/Dislike System

You could always like,dislike anything such as comments,replies and posts. Also you could reset this like so the user's like or dislike is removed

4. Upgrading & Downgrading Users

5. Approving Anything

You could approve anything just by providing the model and the ID of the record you wish to approve

6.Tag

Assign Tags to whatever on your application

You can Assign one tag or multiple tags within one text input and you can set the separator dynamically

7. Authorizing Users & Managing Roles.

Installation Steps

1. Require the Package

After creating your new Laravel application you can include the Jarvis package with the following command:

composer require sectheater/laravel-jarvis:dev-master

2. Add the DB Credentials & APP_URL

Next make sure to create a new database and add your database credentials to your .env file:

DB_HOST=localhost
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret

You will also want to update your website URL inside of the APP_URL variable inside the .env file:

APP_URL=http://localhost:8000

3. Getting Your Environment Ready.

Just Run The following command.

	php artisan sectheater:install
Command Interpretation

1- It sets up your config file by registering whatever you confirm within the survey, in case you use Everything option that command supplies, the default configuration will be used. If you ever want to change anything , go to your config/jarvis.php and set whatever you need. 2- It will provide you a survey so the package sets up which features have to be enabled. 3- It also sets up the authentication routes.

Jarvis doesn't depend on models at all, Everything runs through the repositories to provide you the best quality. Installation Preview

4. Sample Usage

4.1 Registering A User

Whenever you try to register a user, just supply Jarivs with the data and the slug of the role which you want to assign to this user and if you wish to activate this user, pass the third argument

	Jarvis::registerWithRole($data,'user',true)

4.2 Login A User

Logging a user is also an easy thing to do, just pass the data the user tries to attempt with , It can be username/email and password or whatever. Then if you want to remember the user , pass the second argument with true.

	Jarvis::login($data,true) // jarvis()->login($data,true);

4.3 Checking For Roles.

Let's assume I want to check whether the current logged in user has any permissions to create a post or not. It's worth mentioning that whenever you pass many elements to check on and the user has any of them, The method will return you a boolean value

	Jarvis::User()->hasAnyRole(['create-post']) 

We are just checking here if the user has either creating permission under the user/moderator permissions.

	Jarvis::User()->hasAnyRole(['create-tag','moderator.create-tag']) 
/*
first permission determines what the role the user has and then check if he has this permission ,
second one checks if the user has moderator.create-tag and this should exist 
in users table permissions column,
as this doesn't exist in default roles table ( unless you add it )
*/

Sometimes, you want to check if a specific user has all of the roles , not just any of them. Well That's also included.

	Jarvis::User()->hasAllRole(['create-post','edit-post'])

If you want to check on only one permission, you can pass that to the HasAnyRole within an array, Or just do it like the following.

	Jarvis::User()->hasRole('view-post')

If you want to check whether the user has any of the post permissions or whatever, you can do it like the following .

  // you can use the helper also
  jarvis()->user()->hasRole('*-post');

There is much more details within the documentation.

Recently Added Features

Recent Changes

  • Jarvis Middleware is removed.

  • Policies & Gates are set automatically depending on the database roles.

  • Existing relationships Dynamically set depending on existing models either through properties or config file.

  • Observers watch models that has been bounded to the config file dynamically.

  • package_version function is added ( checks the version of any package passed to it )

  • model_exists function is now checking for the user models

  • jarvis_model_exists function only checks for Jarvis's models only.

  • recent method is added to all of Repositories ( you can fetch with it recent stuff under condition and,or approved stuff )

  • Repository Interface updated

  • Basic Repository Is updated, now you can pass to the delete and update methods either an identifier to find or the instance that should be updated/deleted.

  • make:facade command is added

  • make:response command is added

  • make:repository is added

  • package_path function is added

  • Relationships are synchronized with the related models dynamically.

  • Roles Trait is updated.

Extra Commands are added such as :

  • sectheater:register-authorization // registers the policies and gates and publishing them , depending on your database roles.
  • make:observer
  • sectheater:seed-db , seeding your database with the RolesSeeder and call for register-authorization ( optional)

Fixes :

  • Routes in blades are fixed.
  • Jarvis routes method is fixed, removed from web file and It will be added in your Route Service Provider
  • app.blade.php is copied during running sectheater:auth if it doesn't exist
  • RegisterWithRole method is fixed.
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].