Download the PHP package rlgroup/laravel-abilities-controllers without Composer

On this page you can find all versions of the php package rlgroup/laravel-abilities-controllers. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-abilities-controllers

Abilities

A package in Laravel Abilities controller

Installation

Install via composer in the root directory of a Laravel 5 application

composer require rlgroup/laravel-abilities-controllers

migrate

$ php artisan migrate

run

$ php artisan db:seed --class="Rlgroup\\Abilities\\AbilitiesTableSeeder"

Add to Http/Kernel.php in array $routeMiddleware

'abilities' => \Rlgroup\Abilities\AbilitiesMiddleware::class,

Any place that needs to be read to check permissions can be used routeMiddleware abilities

Add to user.php

use Rlgroup\Abilities\UserTrait;  use UserTrait;

Add on app.js page

---------------------------------
import collect from 'collect.js'

Vue.prototype.actionController = (controller, method = null) => {
  if (app && app.abilitiesUser) {
    if (method) {
      return app.abilitiesUser.indexOf(`${controller}@${method}`) > -1 || app.abilitiesUser.indexOf(`*`) > -1
    } else {
      // console.log(app.abilitiesUser, app.abilitiesUser.indexOf(`${controller}`))
      return app.abilitiesUser.filter(r => {
    return r.indexOf(`${controller}`) > -1
      }).length || app.abilitiesUser.indexOf(`*`) > -1
    }
  }

  return false
}

Vue.prototype.actionControllerLeastOne = (controllers, method = null) => {
  if (app && app.abilitiesUser) {
    let isCan = collect(controllers).map((controller) => {
      return app.abilitiesUser.filter(r => {
    return r.indexOf(`${controller}`) > -1
      }).length > 0 || app.abilitiesUser.indexOf(`*`) > -1
    }).contains(true);

    return isCan;
  }

  return false;
}
-----------------------------
const app = new Vue({
  data() {
    return {
    loading: false,
     user: {},
     abilities: []
     }
 },
computed: {
      abilitiesUser() {
    return Object.keys(this.abilities)
      },
      allAbilitiesUser() {
    return this.abilities
      }
    },

    created () {
    this.$vuetify.rtl = true

    axios.get(`/abilities/user`)
      .then(response => {
          if (response.data.status == 'ok') {
        this.user = response.data.user
        this.abilities = response.data.abilities
          }

          this.loading = true;
      }).catch(error => {});
      },
});
------------------------------------------------

And wherever client side testing (VUE) is needed

actionController (action,method)

------------------------------------------------

If the project with the GUARD connection must add the GUARD value to the ENV file

AUTH_GUARD=

All versions of laravel-abilities-controllers with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rlgroup/laravel-abilities-controllers contains the following files

Loading the files please wait ....