I'm always excited to take on new projects and collaborate with innovative minds.

Phone

+2348149096001

Email

hey@mosespius.com

Website

https://mosespius.com

Address

Brick City Estate, Abuja, Kubwa

Social Links

Software Development

Add Notes Functionality to Eloquent Models With the Notable Package

Add Notes Functionality to Eloquent Models With the Notable Package

Notable is a Laravel package that adds polymorphic note functionality to any Eloquent model. It allows you to attach notes/comments to models with creator tracking, timestamps, and powerful query scopes.

This package is helpful for any note-taking features you might need on a model, or for tools like auditing logs and user feedback. It includes powerful query scopes, and you can easily add note support to a model using the ‘HasNotables’ trait:

class SupportTicket extends Model
{
   use HasNotables;
}

// Customer adds note
$ticket->addNote('Still experiencing the issue', $customer);

// Support agent responds
$ticket->addNote('Investigating the problem', $agent);

// Get conversation history
$conversation = $ticket->getNotesWithCreator();
$ticket->getNotesToday();
$ticket->getNotesThisWeek();
$ticket->getNotesThisMonth();
$ticket->getNotesInRange('2024-01-01', '2024-12-31');
$ticket->searchNotes('error');

#Main Features

Polymorphic Relationships - Attach notes to any Eloquent model

Creator Tracking - Track who created each note (also polymorphic!)

Timestamps - Automatic created_at and updated_at tracking

Query Scopes - Powerful query methods for filtering notes

Configurable - Customize table names through config

Easy Integration - Simple trait-based implementation

Laravel 10+ Ready - Built for modern Laravel applications

💻 You can get started with this package on GitHub: EG-Mohamed/Notable.

1 min read
Aug 25, 2025
By Moses Pius
Share

Leave a comment

Your email address will not be published. Required fields are marked *

Related posts

Aug 14, 2025 • 2 min read
Laravel Boost Launches – Your AI Coding Sidekick for 2025
Jul 03, 2025 • 15 min read
How to Design a User-Friendly Website: Expert Best Practices That Work

In this article, we'll explore proven strategies to make your website...