jaybizzle/blade-protect

Protect parts of blade templates being edited by multiple users.

dev-master 2019-03-19 12:55 UTC

This package is auto-updated.

Last update: 2024-12-20 02:16:18 UTC


README

Latest Version on Packagist Build Status Quality Score Total Downloads

Prevent concurrent edits of the same resource by multiple users.

Installation

You can install the package via composer:

composer require jaybizzle/blade-protect
php artisan vendor:publish --provider="Jaybizzle\BladeProtect\BladeProtectServiceProvider" --tag="migrations"

After the migration has been published you can create the protected table by running the migrations:

php artisan migrate
php artisan vendor:publish --provider="Jaybizzle\BladeProtect\BladeProtectServiceProvider" --tag="public" --force

Usage

@protect('user-edit-form', $user->id)

@ifprotected('user-edit-form', $user->id)
    <p>This user cannot be edited becuase another admin is already editing this user</p>
@endprotected

Testing

composer test

Changelog

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

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email mbeech@mark-beech.co.uk instead of using the issue tracker.

Credits

License

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