Skip to content

DutchCodingCompany/laravel-notes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Notes

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.