<commit_before>permissions
===========

Check your permissions with a simple 1-liner: $user->can('do something', $onAnObject)

# About
This package extracts your permission checking code both from your controllers AND your models.
To achieve this we use an approach similar to laracasts/presenter: instead of having the model test the permission and
have the permission code mingle with the model code we have it bring a new object, a PermissionChecker, which does all
the checking for it.

# Install

## Installation

Add to your composer.json following lines

	"require": {
		"ipunkt/permissions": "~1.0"
	}
	
## Configuration

Add 

    'Ipunkt\Permissions\PermissionsServiceProvider'
    
to your service provider list

## Use

Have your Usermodel implement CanInterface and use CanTrait  
Have your Models implement HasPermissionInterface and use HasPermissionTrait

<commit_msg>Minor change to the explanation in the readme<commit_after>permissions
===========

Check your permissions with a simple 1-liner: $user->can('do something', $onAnObject)

# About
This package extracts your permission checking code both from your controllers AND your models.
To achieve this we use an approach similar to laracasts/presenter: instead of having the model test the permission and
have the permission code mingle with the model code we have it bring a new object, a PermissionChecker, which does all
the checking for it.

# Install

## Installation

Add to your composer.json following lines

	"require": {
		"ipunkt/permissions": "~1.0"
	}
	
## Configuration

Add 

    'Ipunkt\Permissions\PermissionsServiceProvider'
    
to your service provider list

## Use

Have your Usermodel implement CanInterface and use CanTrait  
Have your Models implement HasPermissionInterface and use HasPermissionTrait

This will allow you to do $user->can('doSomething', $model);
However, with just this the default for PermissionCheckerInterface from the Laravel IoC is used, which - unless packages
other then this provide any - allows everyone to do everything.

Either have your model provide a PermissionChecker of your own design by specifing a classpath in checker_instance.
Or pull in another package like ipunkt/roles which provides a more sophisticated default.


{'fraction_non_alphanumeric': 0.05856255545696539, 'fraction_numerical': 0.0026619343389529724, 'mean_word_length': 4.782051282051282, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3884541', 'n_tokens_mistral': 582, 'n_tokens_neox': 564, 'n_words': 284}