Download the PHP package binary-cats/laranote without Composer
On this page you can find all versions of the php package binary-cats/laranote. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download binary-cats/laranote
More information about binary-cats/laranote
Files in binary-cats/laranote
Package laranote
Short Description Comment service for Laravel application
License MIT
Homepage https://bitbucket.org/binary-cats/laranote
Informations about the package laranote
Laranotes
Internal note service for your Laravel application. This is not a "blog comment service".
Installation and usage
This package requires PHP 7 and Laravel 5.6 or higher.
Publish Migrations
Optionally, publish configuration
For any model that you want to have notes, import BinaryCats\Laranote\HasManyNotes
as
To get all notes, use the notes()
method.
To add a new note:
a note will be automatically added using currently logged in user. You may pass true
as a second argument, to make the note private.
To add a new note using another user:
You may pass true
as a third argument, to make this note private.
Additional functionality
ContextKey
In addition to notes()
relation, HasManyNotes adds makeContextKey()
that encrypts the model morph class and primary key. This value could be used as a owner key, if want to have a uniform note API service.
Context macros in Request class
To utilize context key on the incoming side of application, Illuminate\Http\Request
class is extended with three macros:
decryptContextKey()
- decrypt the string into arraymakeContext()
- make a model instance out of decrypted keyresolveContext()
-> resolve the model instance from the DB.
Development roadmap
resolveContext()
to include trashed models, if the model supports soft-deletes- Deleting context should result in soft-deleting notes, configurable
- A bootstrap drop-in component
- A vuejs drop-in component
- Global scope of private notes
Testing
Run the tests with:
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 [email protected] instead of using the issue tracker.
Credits
- Cyrill Kalita
- All Contributors
Support us
Binary Cats is a web service agency based in Roselle, Illinois.
Does your business depend on our contributions? Reach out! All pledges will be dedicated to allocating workforce on maintenance and new awesome stuff.
License
The MIT License (MIT). Please see License File for more information.