Ability to attach users as authors to any content
dewsign/laravel-authors is a Laravel package for ability to attach users as authors to any content.
It currently has 0 GitHub stars and 328 downloads on Packagist (latest version v1.0.1).
Install it with composer require dewsign/laravel-authors.
Discover more Laravel packages by dewsign
or browse all Laravel packages to compare alternatives.
Last updated
composer require dewsign/laravel-authors
Attach the trait to any model which you want to be Author-able. E.g. Article.
// App\Article.php
...
use Dewsign\LaravelAuthors\Traits\HasAuthors;
...
If you are not using the default User model for your Authors, you can specify the model you are using in the laravel-authors.php config.
You can now use the Many to Many authors relationship on your Article model to manage authors on this model.
An additional trait to define the inverse relationship on your Author (User) model, IsAuthor is included, however for some reason this isn't working. You can define your own inverse to specific models in the meantime.