noodleware / notey
A lightweight Laravel package for adding notes and comments to any model with a Livewire-powered UI.
Requires
- php: ^8.2
- ezyang/htmlpurifier: ^4.17
- illuminate/support: ^11.0|^12.0
- livewire/livewire: ^3.4
Requires (Dev)
- laravel/pint: ^1.21
README
Notey is a simple Laravel package that allows you to add notes to any model using a polymorphic relationship.
Installation
To install Notey, use Composer:
composer require noodleware/notey
Run the migration to create the necessary database table:
php artisan migrate
This will create one table:
notes
: Stores all notes via a polymorphic relationship.
Publish the package assets:
php artisan vendor:publish --tag=notey
Styling Considerations
After publishing assets, you must include the Notey base stylesheet in your application:
<link rel="stylesheet" href="{{ asset('vendor/notey/notey.css') }}">
Usage
There are two ways to include Notey in your application:
1. Full Component (Pre-styled Card)
To include the fully styled notes component:
<x-notey::notes :model="$model" />
2. Separate Components (For Custom Styling)
You can load the list and form separately to have more control over styling:
<livewire:note-list :model="$model" /> <livewire:note-form :model="$model" />
This allows you to integrate the notes section into your layout while maintaining full control over its appearance.
License
This package is open-source under the MIT License.