Download the PHP package centrex/laravel-model-note without Composer
On this page you can find all versions of the php package centrex/laravel-model-note. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download centrex/laravel-model-note
More information about centrex/laravel-model-note
Files in centrex/laravel-model-note
Package laravel-model-note
Short Description This package add note to eloquent model
License MIT
Homepage https://github.com/centrex/laravel-model-note
Informations about the package laravel-model-note
This package add note to eloquent model
This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
Contents
- Installation
- Usage
- Testing
- Changelog
- Contributing
- Credits
- License
Installation
You can install the package via composer:
You can publish the config file with:
You can publish and run the migrations with:
Usage
Add the HasNotes
trait to a model you like to use notes on.
Add a new note
You can add a new note like this:
Add a private note
You can add a new private note which can be seen only be you like this:
Add a note with tag
Sometimes you will need to tag your note with some tag which can be done like this:
Retrieving notes
You can get the last note of model:
All associated notes of a model can be retrieved like this:
All associated notes of a model with specific tag or tags can be retrieved like this:
All associated private notes of a model with specific tag or tags can be retrieved like this:
Delete a note from model
You can delete any note that has been added on the model by id at any time by using the deleteNote
method:
You can delete any note that has been added on the model by tag at any time by using the deleteNote
method:
Delete all notes from model
You can delete all notes that had been added on the model at any time by using the deleteAllNotes
method:
Delete all notes from model:
Testing
๐งน Keep a modern codebase with Pint:
โ Run refactors using Rector
โ๏ธ Run static analysis using PHPStan:
โ Run unit tests using PEST
๐ Run the entire test suite:
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Credits
- rochi88
- laravel-model-note
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-model-note with dependencies
illuminate/database Version ^10.0|^11.0
illuminate/support Version ^10.0|^11.0