Installation - agilepixels/laravel-resource-abilities GitHub Wiki

You can install this package via composer:

composer require agilepixels/laravel-resource-abilities

The package will automatically register a service provider.

Requirements

This package requires PHP 8.0 and above.

Configuration

Publishing the config file is optional:

php artisan vendor:publish --provider="AgilePixels\ResourceAbilities\ResourceAbilitiesServiceProvider" --tag="config"

This is the default content of the config file:

return [

    /*
    |--------------------------------------------------------------------------
    | Serializer
    |--------------------------------------------------------------------------
    |
    | The serializer will be used for the conversion of abilities to their
    | array representation, when no serializer is explicitly defined for an
    | ability resource this serializer will be used.
    |
    */

    'serializer' => AgilePixels\ResourceAbilities\Serializers\AbilitySerializer::class,
];