creative-syntax/devnote
Devnote is a Laravel package that adds a small notes/todos widget to your app during local development. After installation it appears at the bottom-right of every page when APP_ENV=local and automatically disables in production.
Installation
composer require creative-syntax/devnote
Publish the package configuration (if needed):
php artisan vendor:publish --provider="CreativeSyntax\DevNote\DevNoteServiceProvider" --tag="config"
First Use Case
use CreativeSyntax\DevNote\Facades\DevNote;
DevNote::addNote('Fix login bug', 'auth', 'high');
php artisan devnote:list
DevNote::completeNote(1); // ID from list
Where to Look First
php artisan devnote:list, php artisan devnote:clearCreativeSyntax\DevNote\Facades\DevNoteconfig/devnote.php (if published)Note Management
DevNote::addNote('Refactor user model', 'users', 'medium');
$notes = DevNote::getNotes(['module' => 'auth', 'priority' => 'high']);
Integration with Laravel
public function handle($request, Closure $next) {
$notes = DevNote::getNotes(['module' => request()->route()->getName()]);
view()->share('devNotes', $notes);
return $next($request);
}
@foreach($devNotes as $note)
<div class="note {{ $note->priority }}">
{{ $note->title }} ({{ $note->module }})
</div>
@endforeach
Automation
Illuminate\Foundation\Bootstrapped):
public function boot() {
DevNote::checkForOverdueNotes(); // Hypothetical method
}
Storage Location
storage/framework/devnotes.json by default. Ensure the storage directory is writable.chmod -R 775 storage if permissions are denied.No Database Dependency
Priority Handling
high, medium, low) are case-sensitive. Use lowercase consistently.Clear Corrupted Data
php artisan devnote:clear
Check File Permissions
storage/framework/devnotes.json is writable.Custom Storage
config/devnote.php:
'storage_path' => storage_path('app/devnotes/custom.json'),
Add Custom Fields
CreativeSyntax\DevNote\Models\Note model (if the package allows it) or use a wrapper:
DevNote::addNote('Note', 'module', 'priority', ['custom_field' => 'value']);
API Endpoints
Route::get('/api/devnotes', function () {
return DevNote::getNotes();
});
DevNote::addNote('Note', 'module', 'priority', ['tags' => ['bug', 'auth']]);
storage/framework/devnotes.json from version control (add to .gitignore).How can I help you explore Laravel packages today?