mystamystinc/model-policy-generator

This is a package that creates policies for all the existing models in the project. It is customizable and easy to use.

0.0.10 2024-04-22 02:40 UTC

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This is a package that simply creates policies for all the existing models in the project. It is customizable and easy to use.

Installation

You can install the package via composer:

composer require mystamystinc/model-policy-generator

You can publish the config file with:

php artisan myst:install 

This is the contents of the published config file:

```php
 
return [ 
    'permissions' => [
        'view',
        'view_any',
        'create',
        'update',
        'restore',
        'restore_any',
        'replicate',
        'reorder',
        'delete',
        'delete_any',
        'force_delete',
        'force_delete_any',
    ],
    'models_directory' => 'app/Models',
    'policies_directory' => 'app/Policies',
];

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.