dutchcodingcompany/laravel-notes

1.1.0 2022-02-21 14:07 UTC

This package is auto-updated.

Last update: 2024-12-21 20:30:51 UTC


README

Installation

You can install the package via composer:

composer require dutchcodingcompany/laravel-notes

Then publish the package migrations, configuration files and resources.

php artisan vendor:publish --provider=DutchCodingCompany\Notes\NoteServiceProvider

Then execute the migrations.

php artisan migrate

Configuration

You may change the note model that is used by changing the table or model in the notes.php config.

'table' => 'notes',

'model' => \App\Models\Note::class,

Usage

Add the HasNotes interface and trait to the model.

use DutchCodingCompany\Notes\Concerns\HasNotes;
use DutchCodingCompany\Notes\Contracts\HasNotes as HasNotesContract;

class Post extends Model implements HasNotesContract
{
    use HasNotes;
    
    // ...
}

Credits

License

The MIT License (MIT). Please see License File for more information.